Yeah I stated I’ve tried multiple ways including you’re suggestion, I apologize for the misunderstanding. And for the 1st question I didn’t really know that it mattered that It’s set to the server.
GUIs should always be handled on the client, and you need to change your code to set the GUI visibility to the client. The GUI is being clone or replicated to the Player’s PlayerGui, so you can find it there.
LoadingScreen.OnServerEvent:Connect(function(player, UI)
UI.Visible = true
end)
Correct me if I’m wrong, but you cant change a UIs visibility via the server. You would have to fire the remote FROM the server TO the client, and then change their visibility.
Ok Thanks for helping I will try you’re solution and hopefully It can work.
I don’t actually understand why you’re firing a remote anyways. If your plan is to make a character walk to another position via local script, then at the same time, you can alter their UIs as well. Something like the following:
-- All of this goes inside a local script inside the player
local Teleporter = game.Workspace.Teeportere
local Player = game.Players.LocalPlayer
local location = game.Workspace.Locatio
local RS = game:GetService("ReplicatedStorage")
local LoadingScreen = RS:WaitForChild("LoadingScreen")
local UI = Player.PlayerGui.Loading:WaitForChild("Frame") --notice this change as well, you were changing the wrong UI
–Anything from “StarterGui” gets replicated into the player as a clone. so when you changed the UI in StarterGui, it was too late, the previous copies were already added to the clients.
function LoadingScreen (bool)
UI.Visible = bool
end
Teleporter.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") then
game.Players.LocalPlayer.Character:MoveTo(location.Position + Vector3.new(0,20,0))
end
wait(.05)
Fade(true) -- turns on/off the loading screen
end)
P.S. Wrote all of this inside devforums, there might be errors.