I want to make it so that the player can't move or jump or move the camera (for a little cutscene) but I have no idea how. I attempted to do it myself, but I got an error.
local pName = game.Players:GetChildren().Name local pModel = game.Workspace:GetChildren(pName) print (pName) pModel.Humanoid.JumpPower = 0 pModel.Humanoid.WalkSpeed = 0
Can anyone help with this?
You would use the PlayerAdded event to connect to a function that waits for their character to load. This would set their walkspeed and jumping to 0.
game.Players.PlayerAdded:Connect(function(player) player.CharacterAdded:Wait() player.Character:WaitForChild("Humanoid") player.Character.Humanoid.WalkSpeed = 0 player.Character.Humanoid.JumpPower = 0 end)
Another thing is that it when trying to find their character (the model in the workspace) , never find it in the workspace, as if there is something else with the same name, it may error. Every player has a property called "Character". Also, doing pName = game.Players:GetChildren().Name
won't work, as GetChildren returns a table of the instance (players)'s table.