Issues with player string only showing up in client side

  1. What do you want to achieve?

String value connected to the player shows up on client side but when I click server its not in there, making my pet not show up at all. my script is located in a local script inside a Gui

  1. What is the issue?

No pet shows up in pet-inventory when trying to equip due to string value not working correctly

  1. What solutions have you tried so far?

Re wrote the same script 10x times and its not that, I think It has to do with I’m using a local script to try to ping server to update but with the wrong type of script. I have 0 errors

local petVal = Instance.new("StringValue")
		petVal.Name = pet.Name
		petVal.Parent = player.PetInventory

that’s the script

How are you trying to use a local script to ping the server?
You should use remote events

1 Like

If the Client is creating the StringValue object, the server wouldn’t have a copy of it. Which would result in “nil” on the server.

You can pass in the StringValue.Value, and have the server compare it in some logic and act on what to do next.

Use a RemoteFunction if you want the server to return an object after passing in the value from the client. Keep in mind, if you do return a new object to the client, the client would need a copy. So clone whatever object off the server into ReplicatedStorage. So the client can have a copy of the object.

1 Like

well I’m trying to add a stringValue to a player and it shows up on the client - side but not on server side when testing.

do I have to remote event from the local script to another script somewhere else to have this work?

I believe so, jacknoff

30chars