Why doesn't this script clone the Gui to PlayerGui? How can this be fixed?
Code:
game.Players.PlayerAdded:Connect(function(plr)
local LSystem = plr:WaitForChild("LevelSystem")
local PStats = plr:WaitForChild("PlayerStats")
local level = LSystem:WaitForChild("Level")
local points = PStats:WaitForChild("Points")
level.Changed:Connect(function(val)
points.Value = 0
repeat wait () until plr.Character
local LevelUpCongrats = script.LevelUpCongrats:clone()
LevelUpCongrats.Parent = plr.PlayerGui
end)
end)

5 comments
switch to :Clone(). clone() was deprecated
That didn't fix it :(
hmm this question is really good, I will try to make it stick out so more people can help, meanwhile, I will place this function in a brick or a system and I will find out
Thank you
https://scriptinghelpers.org/blog/tips-tricks-1-debugging-with-print-statements