Hello, I have a script (I followed some of the script from Roblox code sample), but whenever a player touches a part, the sound doesn’t play.
Here is the script:
local players = game:GetService("Players")
local sound = game:GetService("SoundService")
function touched(otherPart)
local partParent = otherPart.Parent
local humanoid = partParent:FindFirstChildWhichIsA("Humanoid")
if humanoid then
sound.FunArcade:Play()
end
end
script.Parent.Touched:Connect(touched)
Is there something that I’m doing wrong? Thank you.