I want the player to equip the speed perk and gain the speed boost, but its not applying the boost. What am I doing wrong?
EquipButton.MouseButton1Down:connect(function()
if InventoryItemImage.Image == "rblxassetid://769111505" then
local HumanoidSpeed = game.Players.LocalPlayer.Humanoid.WalkSpeed
if wins.Value >= 50 then
HumanoidSpeed = HumanoidSpeed * 2
elseif wins.Value >= 45 then
HumanoidSpeed = HumanoidSpeed * 1.9
elseif wins.Value >= 40 then
HumanoidSpeed = HumanoidSpeed * 1.8
elseif wins.Value >= 35 then
HumanoidSpeed = HumanoidSpeed * 1.7
elseif wins.Value >= 30 then
HumanoidSpeed = HumanoidSpeed * 1.6
elseif wins.Value >= 25 then
HumanoidSpeed = HumanoidSpeed * 1.5
elseif wins.Value >= 20 then
HumanoidSpeed = HumanoidSpeed * 1.4
elseif wins.Value >= 15 then
HumanoidSpeed = HumanoidSpeed * 1.3
elseif wins.Value >= 10 then
HumanoidSpeed = HumanoidSpeed * 1.2
elseif wins.Value >= 5 then
HumanoidSpeed = HumanoidSpeed * 1.1
end
end
end)
Also, there error says this:
19:31:04.536 - Humanoid is not a valid member of Player
If Humanoid is not a valid member of players, then what controls the Health, Jump Power, and Walk Speed?

1 comment
Because Humanoid isn't a member of a player. It's a member of a player's character.