So I am trying to script out something where the player inputs in a number into a textbox, a specific event would happen. And another after 2 seconds.
The problem is after typing in, the value stays at the default value ,1.
I am using a server script
My current script is
game.Players.PlayerAdded:Connect(function(player)
local BoxValue = game.StarterGui.ScreenGui.Frame.TextBox.Text
while true do
print("Box Value is"..BoxValue.."")
--Other Code that involves Box Value
wait(2)
end
end)
So how do I change the text value for individual players?
So the text box text is 1. I set it to 1. Players are to change the text to another number to experience a different event. So the text value in the text box
You cannot change anything (to an extent) for individual players with a server script as server scripts cannot access player GUIs. Try exploring the world of local scripts instead.
Local scripts behave differently than server scripts. They can only do this ‘locally’ or only to the user. Try to read up a few posts about it or watch a few YouTube videos explaining it, I find it best to learn scripting through videos.