Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Script that plays music when certain part touches it?

Asked by 8 years ago

This is my first question on this website so please consider that if i make any mistake. I have a script that when something touches the can collide = false block it plays music but this applies with other objects such as other players. How can i make it so it knows that the local player is touching the area? here is what i got so far ~~~~~~~~~~~~~~~~~


function onTouched() game.Workspace.ZONEONEMUSIC:Resume() end game.Workspace.ZONEONE.Touched:connect(onTouched) function endtouch() game.Workspace.ZONEONEMUSIC:Pause() end game.Workspace.ZONEONE.TouchEnded:connect(endtouch) -- this part is when you teleport outside of the block function Tele() game.Workspace.ZONEONEMUSIC:Pause() end game.Workspace.TeleportMorphZONE.Touched:connect(Tele)
0
could you re-format the script? its impossible to read currently lukeb50 631 — 8y
0
I just did. Sorry this is my first post here. only12hours 5 — 8y

Answer this question