Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How come this stats script is not working properly?

So, the script has to grab the stats and show it up on a gui for some reason the script is not working.

local GUI = script.Welcome
local stats = script.playerstats

join = (function (Player)
	local GuiClone = GUI:Clone()
	if not Player.Character then 
		Player.CharacterAdded:wait()
	end
	local statsClone = stats:Clone()
	statsClone.Parent = Player
	GuiClone.Frame.Visible = false
	GuiClone.Parent = Player:findFirstChild("PlayerGui")
end)

game.Players.PlayerAdded:connect(join)
for _,v in next, game.Players:GetPlayers() do
	join(v)
end

3 comments

0

There is no context to this question. 1) What is this supposed to be doing? 2) What is it actually doing? 3) What is script.playerstats? Are there any other scripts interacting with this one?

0

Please atleast Put a Better Description

0

I did

1 answer

✓ Accepted answer

In line 04 you have Join = (function (player) replace that with game.Players.PlayerAdded:connect(function(Player) Please Correct me if I am Wrong, but I think You can't make Functions/Events a Variable.

This discussion is preserved as it was. New answers, comments, and votes are closed.