localscript inside buttongui: local plr = game:GetService("Players").LocalPlayer
local char = plr.Character
local button = script.Parent
local pack = plr.Backpack
local tool = pack.Constructor
local debounce = false
button.MouseButton1Click:Connect(function()
if char:WaitForChild("Minerals").Value <= 249 then
return
end
if char:WaitForChild("Minerals").Value >= 250 and not debounce then
debounce = true
tool.Handle.SpawnerData:FireServer()
end
end)
normal script inside tool:
script.Parent.SpawnerData.OnServerEvent:Connect(function()
print("event fired")
end)
I was trying to fire a remote event at an equipped tool so it can spawn a model, but the tool disappears from the players backback when equipped. this is annoying because I need to be able to access the tool from a gui. is there a way around this issue?

2 comments
You need to include the server codes aswell
When a tool is equipped, it is automatically parented into the player's character