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

RemoteFunction not receiving on the server?

My RemoteFunction does not receive on the server after I invoke it.

Here is the LocalScript code:

local Move = Events["Move"]:InvokeServer(Part.Parent:FindFirstChild("ReferencePart"))

I know it gets past the Move variable because it prints nil

Here is the Script code:

Events["Move"].OnServerInvoke = function(Player, Part)
	local Tween = TS:Create(Player.Character.HumanoidRootPart, TweenInfo.new(0.5), {CFrame = Part.CFrame})
	Tween:Play()
	Tween.Completed:Wait()
	return true
end

It doesn't receive at all, I've tried putting it in a blank script, but it still wouldn't work.

Any help will be highly appreciated!

1 answer

Hey ColeRandom,

Have you tried running connect when you check for an Invoke?

-- Here is a potential server script code I have assembled for you

Events["Move"].OnServerInvoke:Connect(function(Player, Part)
    local Tween = TS:Create(Player.Character.HumanoidRootPart, TweenInfo.new(0.5), {CFrame = Part.CFrame})
    Tween:Play()
    Tween.Completed:Wait()
    return true
end)

Also, is Events defined?

If you have any issues with either of these scripts don't hesitate to ask.

Cheers, Orcazate

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