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

Why does my gui replicate script not work?

Asked by 9 years ago

It is supposed to put the gui into the players "PlayerGui" but it does not do that and it also does not output an error.

game.Players.PlayerAdded:connect(function(player) player.CharacterAdded:connect(function(Character) local person = game.Players.LocalPlayer local guiclone = game.Lighting.ScreenGui:Clone() guiclone.Parent = person.PlayerGui end) end)

1 answer

Log in to vote
0
Answered by 9 years ago

Hi, you made a function to run when a player is added then an unnecessary player.CharacterAdded:connect part strait after it.

Here's how it should have looked:

game.Players.PlayerAdded:connect(function(player) 

local person = game.Players.LocalPlayer
local guiclone = game.Lighting.ScreenGui:Clone()
guiclone.Parent = person.PlayerGui end)

Please accept the answer.

~topgeartrain

0
Its still not working ,the gui does not show up for the player. raspyjessie 117 — 9y
0
Make sure its in the right place, named correctly and make sure the Visible Value is set to true. topgeartrain 0 — 9y
Ad

Answer this question