For example: What if i had this code:
Local clickdetector = script.Parent.Clickdetector clickdetector.MouseClick:Connect(function() local newpart = game.Workspace.part end) -- Here it will underline "newpart" with a red. How would I make it not do that?
To define a global variable, use shared:
1 | shared.Money = 100 |
2 |
3 | print (shared.Money) |
Hope this helped!