I’m trying to make it so when you spawn in you cannot move or jump. But when I implement the code to change your walkspeed and jump height it does not work.
Is it possible to change speed with a localscript in startergui?
You need to change the WalkSpeed and JumpPower of the character’s humanoid, not StarterPlayer.
local player = game:GetService("Players").LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local humanoid = character:WaitForChild("Humanoid")
-- Prevent the character from moving while the screen is up
humanoid.WalkSpeed = 0
humanoid.JumpPower = 0
playButton.MouseButton1Click:Connect(function()
-- Enable movement once the player clicks the play button
mainFrame.Visible = false
humanoid.WalkSpeed = 16
humanoid.JumpPower = 50
end)