Can anyone explain why my RemoteFunction won't return true?
Asked by
1 year ago Edited 1 year ago
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