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

RemoteEvent firing and received, but the script isn't working?

Asked by 5 years ago

The RemoteEvent fires and is received as it's prints it, but the PlayerGui parts do not work, as well as the CameraFix cloning into the Player's character.

train = game.ReplicatedStorage.C153
Camera = workspace.CurrentCamera


game.ReplicatedStorage.C153Spawn.OnServerEvent:connect(function(player)
    print("Event Received")
        player.PlayerGui.MainMenuGui.Screen.DriveFrame.Visible = false
        player.PlayerGui.MainMenuGui.Screen.Spawning.Visible = true
        player.PlayerGui.MainMenuGui.Screen.Spawning.Text = "Spawning..."
        wait(0.01)
        local clone = train:Clone()
        clone.Parent = workspace
        clone:MakeJoints()
        clone.Bogies.SD_Bogie:MakeJoints()
        clone.Bogies.SD_Bogie2:MakeJoints()
        wait(1)
        player.Character.HumanoidRootPart.CFrame = CFrame.new(-2449.474, 10.174, -198.335)
        player.PlayerGui.MainMenuGui.Screen.Spawning.Visible = false
        player.PlayerGui.MainMenuGui.Screen.IntroMusic:stop()
  script.Parent.CameraFix:clone().Parent = player.Character
end)

This is what is visible in the developer console: https://gyazo.com/80f97bddbd4561a789993d930de82abb

0
Can you post a picture of all the children of screen gui > etc. > etc. ? AltNature 169 — 5y
0
:Clone not :clone. :Stop not :stop. :Connect not :connect. Also, PlayerGui should NOT be accessed from the server. and Alt, you mean the hierarchy? User#19524 175 — 5y
0
If PlayerGui cannot be accessed from the server, how does one access it? I can't do local scripts with Remote Events, can I? CarlPlandog 20 — 5y
0
The rest works apart from the Camera script cloning and the Gui showing the text and disappearing CarlPlandog 20 — 5y

Answer this question