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

Why does it tell me RemoteFunction is not a valid member of Script?

disabled = false

script.Parent.MouseButton1Click:Connect(function()
	if disabled == false then
		disabled = true
		script.Parent.BackgroundColor3 = Color3.new(217, 0, 0)
		game.Workspace.Teleport.RemoteFunction:invokeServer()
		wait(3)
		script.Parent.BackgroundColor3 = Color3.new(0, 154, 0)
		disabled = false
	end
end)

3 comments

0

Can you show a bigger chunk of your script to see if you made a RemoteFunction?

0

We need the whole script to identify why it doesn't work.

0

Yeah I posted it now

1 answer

local part = game.Workspace.Bridges.Bridge1.Base

script.RemoteFunction.OnServerInvoke = function(player)
	local humanoid = player.Character.Humanoid
	if humanoid.Parent:FindFirstChild("Torso") then
		humanoid.Parent.Torso.Cframe = CFrame.new(part.Position + Vector3.new(0,3,0))
	elseif humanoid.Parent:FindFirstChild("UpperTorso") then
		humanoid.Parent.UpperTorso.Cframe = CFrame.new(part.Position + Vector3.new(0,3,0))
	else print("notroso")
	end
end

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