Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Why does my local script not fireserver ?

the local script

local Player = game.Players.LocalPlayer
local mouse = Player:GetMouse()
local T = script.Parent
local handle = T:WaitForChild('Handle')
local debounce = false
local RemoteEvent = script.Parent.RemoteEvent
T.Activated:Connect(function()
	local H = T.Parent:FindFirstChildWhichIsA("Humanoid")
	if H and debounce ~= false then
		debounce = true
		local position = mouse.Hit.Position
		T.RemoteEvent:FireServer(position)
		wait(2)
		debounce = false
	end
end)

idk whats wrong so please help.

1 answer

✓ Accepted answer

The problem is at line 9. You're checking for the 'debounce' to be true when it's currently set at false. Consider changing the 'debounce' to true. (or debounce == false)

This discussion is preserved as it was. New answers, comments, and votes are closed.