Hello, I am doing a Roblox game in which you have to choose a class to get the weapons. But when you equip a weapon after you choose a class, it is like nothing (like an empty tool). This is the script and the error:
button = script.Parent
Backpack = game.Players.LocalPlayer.Backpack
function chr(equip)
game.Players.PlayerAdded:connect(function(equip)
chr.CharacterAdded:connect(function(equip)
chr.Humanoid:EquipTool(Backpack.Kar98)
end)
end)
end
button.MouseButton1Click:connect(equip)
function chr()
game.Players.PlayerAdded:connect(function(plr)
plr.CharacterAdded:connect(function(chr)
repeat wait() until chr.Humanoid
wait(1)
plr:LoadCharacter()
end)
end)
end
button.MouseButton1Click:connect(chr)
wait(1)
player = game.Players.LocalPlayer
button = script.Parent
function Tele()
torso = player.Character.Torso
torso.CFrame = game.Workspace.telepart.CFrame
end
button.MouseButton1Click:connect(Tele)
https://cdn.discordapp.com/attachments/469855834826997800/469969752236752957/unknown.png

2 comments
You shouldn't handle PlayerAdded on the client. Also, the MouseButton1Click doesn't pass any parameters.
Could you tell me how to fix it please?