Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Why wont this local script work?

This script is a local script inside of the baseplate it is supposed to make a sound play when touched. This does not work.

function onTouch(part)
	script.Parent.Parent.Sound:Play()
end
script.Parent.Touched:connect(onTouch)

1 answer

✓ Accepted answer

Local scripts can only be run on the client. Use a regular script for this, and preferably put it in ServerScriptStorage, it would like this.

--In serverscriptstorage
workspace.Baseplate.Touched:connect(function()
	workspace.Sound:Play() --I assume this is where it is?
end)

This discussion is preserved as it was. New answers, comments, and votes are closed.