I get this error every time i run my code. The game is a classic DCO, and for whatever reason, the stage transfer feature gives this error and doesnt do what its supposed to error:
FireServer is not a valid member of Model "ReplicatedStorage.StageTransfer"
and here is the code:
local player = game.Players.LocalPlayer local RS = game:GetService("ReplicatedStorage")
repeat wait() until player.leaderstats.Stage ~= nil or player.TeleportedStage ~= nil
local function DownClicked() RS.StageTransfer:FireServer("down") end script.Parent.Down.MouseButton1Down:Connect(DownClicked)
local function UpClicked() RS.StageTransfer:FireServer("up") end script.Parent.Up.MouseButton1Down:Connect(UpClicked)
local function UpdateStage() script.Parent.CurrentStage.Text = player.TeleportedStage.Value end player.TeleportedStage.Changed:Connect(UpdateStage)
The error states you are calling FireServer
on a model, ReplicatedStoraged.StageTransfer
.
As you stated, the RemoteEvent is inside a part. You will have to correct your script to the correct path of ReplicatedStorage.StageTransferFolder.StageTransfer
.