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

How to make the script recognize that the part is in a folder?

Asked by 4 years ago

so im trying to get it to recognize that it's in a folder in workspace

if ( humanoid ) then
        workspace.SoundTouchPart.Sound:Play()

My folder is called "Coins" and when the coin in a folder it doesn't play the sound but it when it's out of the folder it does

I just want it to be in the folder for organization purposes, thanks!

1 answer

Log in to vote
0
Answered by 4 years ago

if ( humanoid ) then workspace.Coins.SoundTouchPart.Sound:Play()

That should work.

Workspace is the main area and then the folder is within workspace so you just use a . dot after workspace to ref the next location which is Coins and then another . dot and then your file.

Ad

Answer this question