Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by 5 years ago
Edited 5 years ago
01disabled = false
02 
03script.Parent.MouseButton1Click:Connect(function()
04    if disabled == false then
05        disabled = true
06        script.Parent.BackgroundColor3 = Color3.new(217, 0, 0)
07        game.Workspace.Teleport.RemoteFunction:invokeServer()
08        wait(3)
09        script.Parent.BackgroundColor3 = Color3.new(0, 154, 0)
10        disabled = false
11    end
12end)
0
Can you show a bigger chunk of your script to see if you made a RemoteFunction? chafava -113 — 5y
0
We need the whole script to identify why it doesn't work. Dalamix 26 — 5y
0
Yeah I posted it now Skydoeskey 108 — 5y

1 answer

Log in to vote
0
Answered by 5 years ago
01local part = game.Workspace.Bridges.Bridge1.Base
02 
03script.RemoteFunction.OnServerInvoke = function(player)
04    local humanoid = player.Character.Humanoid
05    if humanoid.Parent:FindFirstChild("Torso") then
06        humanoid.Parent.Torso.Cframe = CFrame.new(part.Position + Vector3.new(0,3,0))
07    elseif humanoid.Parent:FindFirstChild("UpperTorso") then
08        humanoid.Parent.UpperTorso.Cframe = CFrame.new(part.Position + Vector3.new(0,3,0))
09    else print("notroso")
10    end
11end
Ad

Answer this question