local PokeEvent = game.ReplicatedStorage.PuckPokeEvent

function PokeEvent.OnServerInvoke(Player, StickPart, Torso, StickTool)
	print('event')
	local Debounce = false;
	StickPart.Touched:Connect(function(Touch)
		if Touch.Name == 'Puck' and Debounce == false then
			print('hi')
			Debounce = true
			local Motor6d = Instance.new('Motor6D')
			Touch.Parent = StickTool
			Motor6d.Parent = Torso
			Motor6d.Part0 = Torso
			Motor6d.Part1 = Touch
			Motor6d.Name = 'Puck'
			return true
		end
	end)
	task.wait(1)
	Debounce = true
	return false
end

3 comments

0

did you try adding " return true" at the very end?

0

I only want it to return true if it touches the puck.

0

You are not returning back to the remote function. 'return true' is inside the Touched event which will return back to the touched event rather than the remote function.