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

Why will this sound not play?

Asked by
mrcool2 75
8 years ago

I have got other sounds on my game that play when an event happens, however this script for some reason will not play the sound. and I have no idea why..

local sound = script.parent.Slateskin
function touch()
    sound:Play()
end

script.parent.Touched:connect(touch)

2 answers

Log in to vote
1
Answered by
Shawnyg 4330 Trusted Badge of Merit Snack Break Moderation Voter Community Moderator
8 years ago

Well, it's the most obvious one of them all! Capitalize Parent!

local sound = script.Parent.Slateskin
function touch()
    sound:Play()
end

script.Parent.Touched:connect(touch)
0
JesusChrist. I am an idiot. mrcool2 75 — 8y
Ad
Log in to vote
0
Answered by 8 years ago

i just need general help with scripting. im trying to learn:)

Answer this question