Help with CharacterAdded / RemoteEvent

the issue is probably here
add a print there saying Owned and use else and do another print saying not owned

can you show a screenshot of the players folder there

1 Like

Ok give me a minute ill test that

1 Like

Folder:
image
The item is at folder but still saying I need to buy it, I don’t understand why that happens

1 Like

image
I have the tool but it says I don’t have it

1 Like

what is this value set to?

also what script or when does a script add the folder for the player and add in the tools this maybe running before that happens

alot of times you setup a table in a module script in replicated to hold all the info of items like Name = ‘TestTool’, Price = 1000, ItemName = ‘BananaTool’ etc

1 Like

image
The same name

1 Like

When I join to game / leave / respawn the tool get saved but it don’t say that I owned it

So I don’t think its a DataStore issue

1 Like

you can do all this client side without a remote event

you should connect to the folder being created and then run for loop to see what tools are there or if a child added run again to update ui if it is visible

you can also do this directly on the player data change if the client has access to it

1 Like

I tried it with client side before, but so this can work without remote event?

1 Like

no it seems to be issue with how you have the client side checking from a remote fire from server right as the player join

also i notice in your player folder you have a flashlight but the only product i see on that one has value name of medkit but that maybe you just adding it for testing if so you need to update the ui after the tool is added to the players folder

maybe do something like this

local PlayerFolder = game.ReplicatedStorage.PlayerToolFolder:WaitForChild(Player.Name)

PlayerFolder.ChildAdded:Connect(function(Child)  -- child is the tool that was added
	-- Update your ui here
	-- probably should use a for loop to do this for all products in there
end)

1 Like

But when I use CharacterAdded it never work for me on that local script

1 Like

Thank you ill try that in local script

1 Like

I didn’t fixed the script but I was able to make a new system that works similar to this one.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.