I have tried this but none of it worked,none of it.
if part.Ontouched then part.CFrame = part.CFrame.new (42, 0.59, 49) msc = Instance.new("Sound", Workspace) msc.SoundId="http://www.roblox.com/asset/?id=131111368" while true do wait(10) msc:Play() end
You forgot a connection line for your player. Tip: Not everything that touches the part will always be a player. Also, you included a loop for no reason.
on = false script.Parent.Touched:connect(function(hit) if hit.Parent and game.Players:GetPlayerFromCharacter(hit.Parent) then if not on then on = true part.CFrame = part.CFrame.new (42, 0.59, 49) msc = Instance.new("Sound", script.Parent) msc.SoundId = "http://www.roblox.com/asset/?id=131111368" wait() msc:Play() wait(10) msg:Stop() on = false end end end)
Where is ur connection line, is this the whole script?