How is it possible to replicate a string value from client to server?
Asked by
4 years ago Edited 4 years ago
So right now, I have a localscript:
1 | script.Parent.Frame.Confirm.MouseButton 1 Click:Connect( function () |
2 | script.Parent.Enabled = false |
3 | game.Workspace.Text.SurfaceGui.TextLabel.Text = script.Parent.Frame.TextProduct.Text .. " $" .. script.Parent.Frame.TextPrice.Text |
4 | game.ReplicatedStorage.Sign.Value = script.Parent.Frame.TextProduct.Text .. " $" .. script.Parent.Frame.TextPrice.Text |
I also have a script:
2 | print (game.ReplicatedStorage.Sign.Value) |
3 | game.Workspace.Text.SurfaceGui.TextLabel.Text = game.ReplicatedStorage.Sign.Value |
When printing, it prints nothing because that is how the string value starts.. It shows up on the client, but when on the server the string value doesn't change. I thought you could change a value on the client and it would replicate to the server in ReplicatedStorage, but I don't know how. How would I do this?