I have 2 text boxes and my script prints one of them but not the other, the "potatoes" is printing fine, but the "name" isn't, could anyone tell me why this would be?
01 | script.Parent.MouseButton 1 Click:Connect( function () |
02 | local name = script.Parent.Name.Text |
03 | local potatoes = script.Parent.Potatoes.Text |
04 | if name ~ = "" and potatoes ~ = "" then |
05 | print ( tonumber (potatoes)) |
06 | print ( tostring (name)) |
07 | game.ReplicatedStorage.PotatoesCommand:FireServer(name, potatoes) |
08 | end |
09 |
10 | end ) |
Try changing script.Parent.Name 's name to something else since it might think you're trying to get the parent's actual name.