Ad
Log in to vote
0

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

Asked by
Kulh 104
11 months 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 104 — 11mo
0
I'm pretty sure you're supposed to create an "IntValue" instead of a "Folder", for both. iiMayk 437 — 11mo
0
+iiMayk A folder works just fine. stefdejup1 0 — 11mo

1 answer

Log in to vote
0
Answered by
Kulh 104
11 months ago

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

Ad

Answer this question