I'm very new to scripting and i can't figure out how to detect if an int value is 1. I don't see what is wrong with this script
1 | if game.Workspace.Value 1. Value = = 1 then |
2 | game.Workspace.Sound 4. Playing = true |
3 |
4 | end |
Two things;
You play a sound with Sound:Play()
You should use game.Workspace:WaitForChild("Value1")
1 | --Variables-- |
2 | local value = game.Workspace:WaitForChild( "Value1" ) --Pauses the script until Value1 loads in |
3 | local sound = game.Workspace:WaitForChild( "Sound4" ) --Does the same for Sound4 |
4 |
5 | if game.Workspace.Value 1. Value = = 1 then |
6 | sound:Play() |
7 | end |
p.s: You can use the keyword workspace
when referring to game.Workspace
in a script!