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

Lines not working, but no errors in output? (Filtering Enabled)

Asked by
Kulh 125
6 years ago

The following lines of code are snipped from the original script.

The code fires when a new player joins the game. It is located within a Server-Sided script.

    local leaderstats = Instance.new("Folder")
    leaderstats.Name = "leaderstats"
    leaderstats.Parent = player
    local cash = Instance.new("NumberValue")
    cash.Name = "Cash"
    cash.Value = usercashpath
    cash.Parent = leaderstats

The problem is, the leaderstats folder is not created into the player.

0
Anyone got a clue? I thought during Filtering Enabled conditions, a server sided script had all rights? Here it seems that it is requiring some sort of server action to create the instances. Kulh 125 — 6y
0
I'm pretty sure you're supposed to create an "IntValue" instead of a "Folder", for both. Mayk728 855 — 6y
0
+iiMayk A folder works just fine. stefdejup1 0 — 6y

1 answer

Log in to vote
0
Answered by
Kulh 125
6 years ago

I figured out the issue, i was using FindFirstChild(), instead of :WaitForChild for usercashpath value.

Ad

Answer this question