So I want to make a script which will pop a GUI up whenever someone respawns.FE is enabled, I've made the script but it doesn't seem to work for some reasons(Not popping up even when someone spawns first time)
These are inside the StarterPack(Might be the issue)
Script
local Players = game:GetService("Players")
local RemoteEvent = game:GetService("ReplicatedStorage"):WaitForChild("Events"):WaitForChild("GiveGui")
function onPlayerAdded(player)
RemoteEvent:FireClient()
end
Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(onPlayerAdded)
end)
Local Script
local RemoteEvent = game:GetService("ReplicatedStorage"):WaitForChild("Events"):WaitForChild("GiveGui")
RemoteEvent.OnClientEvent:Connect(function(player)
local gui = game:GetService("ReplicatedStorage"):WaitForChild("Natures"):Clone()
gui.Parent = player.PlayerGui
gui.Enabled = true
end)
Thank you!

8 comments
i would do some sort of :PlayerAdded kinda thing :/
Also why make it FE if only the player will see it
oops sorry i realized you did do player added sorry
Didn't I do a 'PlayerAdded kinda thing'?
sorry
In the script, shouldn't you be specifying which player you need to FireClient to? The first argument should tell the server which player you're firing the remote event to, but yours is empty.
I mean parameter not argument
Still won't work.