local soundregions = workspace:FindFirstChild("SoundRegions") if game.Workspace:FindFirstChild("Bridge Fight: By ReaIisticaI") then script.Parent.Parent = soundregions end local Map = game.Workspace:FindFirstChild("Bridge Fight: By ReaIisticaI") local Game = workspace.SoundRegions:FindFirstChild("Game") if Game and not Map then Game:Destroy() end
I think it's because Game
is another variable for the global roblox variable game
, so the Game
variable is overwriting the variable that you made. Try renaming the variable that you made to something like gameSoundRegion
or something like that.
Because of the capitalized letter, the fact that game
is a global roblox term shouldn't matter in this case. Have you checked to see if it's because of the not Map
check? You can use this code to determine if it is, replacing it with lines 8-10:
if Game then print("Game works fine") elseif not Map then print("not Map works fine") end
if both of these print into your output (which you can enable on View tab of Studio), the problem may be that the Game
part is not in SoundRegions