Hey there, me again, so this time I got a free model and edited the script a bit so when you click the starting screen button it would equip it, but I get this error
07:44:05.474 - StarterGui is not a valid member of Player
I know that means something is wrong with the local player but I can't seem to get to an answer to get the game.players. the players name here with the starter GUI there,
###Can someone debunk this myth?
The script is inside "my" knife, the code I edited makes them not able to de-equip it.
wait(1)
local screenGOOEY = game.Players.LocalPlayer.StarterGui.StartingScreen.screenthing
local playbutton = screenGOOEY.plzplaybutton
local tool = script.Parent
local player = game.Players.LocalPlayer
local hum = player.Character.Humanoid
tool.Equipped:connect(function(mouse)
game:GetService("RunService").RenderStepped:connect(function()
if not hum.Parent:FindFirstChild(tool.Name) then
hum:EquipTool(tool)
end
end)
end)
if playbutton.MouseButton1Click then
if not hum.Parent:FindFirstChild(tool.Name) then
hum:EquipTool(tool)
end
print("knifeequiped on playbutton click hah")
end
Thanks,
Narwhal

1 comment
Again, Thanks!