-The script is inside a part in the Workspace -When it is touched the below script activates -It works perfectly in studio but not in game, any ideas ?
local debounce = false local debounce2 = false local ReplicatedStorage = game:GetService("ReplicatedStorage") local DropBallClientEvent = Instance.new("RemoteEvent", ReplicatedStorage) DropBallClientEvent.Name = "DropBallClientEvent" script.Parent.Touched:connect(function(hit) if debounce2 == true then return end if hit.Parent:FindFirstChild("Humanoid") ~= nil then debounce2 = true local player = game.Players:GetPlayerFromCharacter(hit.Parent) if player.Team == game.Teams["-Home GK"] then if player.Backpack.LocalVariables:WaitForChild("ObjectHeld").Value ~= nil then DropBallClientEvent:FireClient(player) end end end wait(1) debounce2 = false end)