my Tool explosion script is not working in game but only in studio and it has no errors?
my script doesn't work in game and there was no errors in the output and developer console. when I changed it to a local script it caused an error in game in developer console
what should I do to fix this
here's the script
local tool = script.Parent
local player = game:GetService("Players").LocalPlayer
debounce = false
tool.Equipped:connect(function(mouse)
print("Tool equipped!")
mouse.Button1Down:connect(function()
if debounce == true then return end
debounce = true
local original = game.ServerStorage.objects.explosion -- normal explosions don't work in my
-- Game because of my starter character so I have to make my own
local copy = original:Clone()
copy.Parent = game.Workspace.objects
copy.Position = mouse.Hit.p
wait(2)
debounce = false
end)
end)