So, I have no idea if I am even doing this right or not, I am trying to make a different sound play when you pass through a part, and make another sound stop playing. I have come to a place where the code is stating that the errors states, "Expected '(','{' or , got 'workspace'." I try placing some (, but I don't know why it needs it, where it needs it, or what I am doing. Any help would be appreciated.
script.Parent.Touched:connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") then
game.Lighting.ClockTime = 0
game.Lighting.SunRays.Enabled = false
if workspace.GrassMusic.IsPlaying == false and workspace.HubMusic.IsPlaying == true
then workspace["GrassMusic"]:Play workspace["HubMusic"]:Stop
end
end
end)

1 comment
Oh, hah.. Thank you, now how do I accept your response, making this answered?