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

How come this stats script is not working properly?

Asked by 9 years ago

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
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? adark 5487 — 9y
0
Please atleast Put a Better Description woodengop 1134 — 9y
0
I did alan3401 28 — 9y

1 answer

Log in to vote
0
Answered by
woodengop 1134 Moderation Voter
9 years ago

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.

Ad

Answer this question