Hello! I am making a chemical thrower gear from Bioshock! I have a gui for it and I made it so when I equip the Tool it becomes visible. However it does not go away when i try this part:
local Tool = script.Parent; enabled = true function onButton1Down(mouse) if not enabled then return end enabled = false mouse.Icon = "rbxasset://textures\\GunWaitCursor.png" wait(7) mouse.Icon = "rbxassetid://207207462" enabled = true end function onEquippedLocal(mouse) game.Players.LocalPlayer.PlayerGui.ChemGui.Frame.Visible = true if mouse == nil then print("Mouse not found") return end mouse.Icon = "rbxassetid://207207462" mouse.Button1Down:connect(function() onButton1Down(mouse) end) end function Unequipped(mouse) game.Players.LocalPlayer.PlayerGui.ChemGui.Frame.Visible = false end Tool.Unequipped:connect(UnequippedLocal) --Where I have trouble Tool.Equipped:connect(onEquippedLocal)
I don't know why it is doing this but here is what is in the output: 11:24:54.168 - Attempt to connect failed: Passed value is not a function 11:24:54.169 - Script 'Players.Player1.Backpack.Flame Thrower.Local Gui', Line 34 11:24:54.170 - Stack End 11:24:56.097 - attempt to call a nil value
Any help?
~Minikitkat
There is no UnequippedLocal... you have Unequipped, but not the Local part.