#What is wrong with my DataSave? (tryin to save a GUI number)
1 messages · Page 1 of 1 (latest)
Quite hard to look at Light Mode coding but anyways, I don't know if I've found the solution but I can see some things are not done correctly
Script
- I think that when you GetAsync, you don't need the
tonumber(speedamounttext.Text) speedamounttextis already a string, you cannot try to look for its Text property since it is not an Instance.- Move the
players.PlayerRemovingout of yourOnServerEventconnection.
LocalScript
In the LocalScript, speedtext = speedamount does absolutely nothing because speedtext is just a string and not actually the property, and player is not returned to LocalScripts since it would return yourself.
Do this instead:
SpeedToServer.OnClientEvent:Connect(function(speedAmount)
local speedText = script.Parent.Text
speedText.Text = tostring(speedAmount)
end)