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

Respawn script not working?

Asked by 8 years ago

I made this respawn script using the CharacterAdded function to give a player some guis however it's not working. The game uses filteringenabled and won't load any of the starterguis or tools. I have the script currently in ServerScriptService, what it's suppose to do is when a player Respawns/dies they get the starterguis located in a folder under ServerStorage. I checked in test mode, that the server's side has the guis, however the client's side doesn't. This is the script I have:

player.CharacterAdded:connect(function(char)
plyr = game.Players:GetPlayerFromCharacter(char)
camscript = script.CameraScript:clone()
camscript.Parent = plyr.Backpack
camscript.Disabled = false
for i = 1,#sguis do
gui = sguis[i]:clone()
gui.Parent = plyr.PlayerGui
end
end)

My question is, is there something I did wrong here and are there other ways of making StarterGuis/StarterPack work?

0
please use a code block. Hero_ic 502 — 8y
0
Sorry, I'm not sure how too. OneTruePain 191 — 8y
0
Editted for: Code block. M39a9am3R 3210 — 8y
1
the startergui should clone to playergui when a player spawns automatically ProfessorSev 220 — 8y
0
Well that's the thing, it clones on the clients side, but not the servers side. So when I fire a remoteevent that involves changing the gui, the script can't the gui because it isn't there. OneTruePain 191 — 8y

Answer this question