Hello Developers. I was coding a jumpboost script and it is failing. Any ideas why?
local players = game:GetService("Players")
local player = players.LocalPlayer
local part = script.Parent
local currentj = player.Humanoid.JumpPower
local current = #currentj
local yes = nil
part.Touched:Connect(function(player)
yes = true
end)
part.TouchEnded:Connect(function(player)
yes = false
end)
while true do
if yes == true then
currentj = 20
else
currentj = current
end
end
Like @24Nick_42 said local scripts will not run inside parts but also something else is that you are trying to get the Humanoid of a player. You need to get the character from the player and then get the humanoid cuz the player itself does not have a humanoid only the character of the player
From the documentation about Player.Character on how to get the character from the player (ignore the stuff u don’t need):