9/24/2023 0 Comments Wait for character roblox![]() ![]() Local isScientist = player.Team = game.Teams. ![]() Local player = game.Players:GetPlayerFromCharacter(hit.parent) check if character is not dead and a scientist So your script should look something like this in the end: local player player.CharacterAdded:Connect (function (character) -Do stuff with character instance here, this will only fire once the character has been added end)) If I don’t place the wait () function at the beginning of the local script, then everything. everything after this point happens once the player was not touching before, so flip the debounce flag escape if this player is already touching the floor Unless there is a visible GUI present with the GuiButton.Modal property set to true, the mouse will be locked and the user's camera will turn as the mouse moves. ![]() In first-person mode, the player's camera is zoomed all the way in. Local hum = char:FindFirstChild("Humanoid") - Humanoid The CameraMode Enum is used to set CameraMode in Player, and determines when first and third person cameras should be used. check that the thing that hit is a player I would recommend debouncing the connection so that only one loop happens per player : - create a map of players touching the floor What is probably happening is that this event is firing multiple times, and you have a bunch of these repeat-while loops all running at the same time, causing the player's health to drop very quickly. If the player is walking across the floor, it will fire every time the player's foot hits it. You have this callback connected to the Touched event, and the event will fire every time a player touches the part. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |