Ad
Log in to vote
0

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

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

Hi.

Looks like you're using an ad blocker.

That's fine...

No, it really is.

Just, I mean, we put a lot of work into this site, you know?

It would be really really appreciated if you would turn off your ad blocker for our website...

We tried really hard to make our ads as unobtrusive as possible.

If you really hate ads, would you consider a $2 donation via Patreon?

Here's the link.

We love you. We hope you love us too.

.

..

...

Now back to your regularly scheduled Scripting Helpers....

...

..

.

1 answer

Log in to vote
0
Answered by
Kulh 39
3 days ago

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

Ad

Answer this question



Ad