Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Line 21-25 doesn't run, does anyone know how I can do this but like have it work every time?

Asked by 4 years ago
Edited by Leamir 4 years ago

--Code--

            if game.Players:GetPlayerFromCharacter(hit.Parent) then
                  PlayerItem.Parent = game.Players:GetPlayerFromCharacter(hit.Parent).Character
                            game.Players:GetPlayerFromCharacter(hit.Parent).Character.Humanoid.WalkSpeed = 16
                game.Players:GetPlayerFromCharacter(hit.Parent).Character.Humanoid.JumpPower = 50
end

1 answer

Log in to vote
0
Answered by
raid6n 2196 Moderation Voter Community Moderator
4 years ago

just change the code to:

if game.Players:GetPlayerFromCharacter(hit.Parent) then 
PlayerItem.Parent = hit.Parent 
hit.Parent.Humanoid.WalkSpeed = 16 
hit.Parent.Humanoid.JumpPower = 50 
end
Ad

Answer this question