this is my script but i cant equip the tool even though it says to i put this in StarterPlayer StarterPlayerScrips LocalScript
local player = game.Players.LocalPlayer
y = 1
x = game.Lighting["Baton"]:Clone();
game:GetService("UserInputService").InputBegan:connect(function(inputObject, gameProcessedEvent)
if inputObject.KeyCode == Enum.KeyCode.E then
if y == 1 then
player:EquipTool(x)
y = 2
elseif y == 2 then
player:UnequipTools()
y = 1
end
end
end)
w = game.Lighting["BillyClubRiotShield"]:Clone();
game:GetService("UserInputService").InputBegan:connect(function(inputObject, gameProcessedEvent)
if inputObject.KeyCode == Enum.KeyCode.Q then
if y == 1 then
player:EquipTool(w)
y = 2
elseif y == 2 then
player:UnequipTools()
y = 1
end
end
end)

1 comment
thanks