I get this error, Workspace.BootShack.Boots.Clickbox.ClickDetector.BuyBoot:17: attempt to index nil with 'Name'
Code is right here.
local player = game.Players.LocalPlayer -- this is the variable im referencing.
script.Parent.MouseClick:Connect(function()
if _G.points < 3 then
print("Player is missing required money.")
end
if _G.points > 2 then
_G.points = _G.points - 3
workspace{player.Name}:FindFirstChild("Humanoid").WalkSpeed = 22 --I get the error right here.
script.Parent.MaxActivationDistance = 0
script.Parent.Parent.Parent.Boots.Transparency = 1
script.Parent.Parent.Parent.Boots.CanCollide = false
end
end)

1 comment
this a localscript?