i've tried multiple tutorials, but they don't seem to work at all.
COMMUNITY QUESTION
how do i make a sound play when i turn into a morph?
1 answer
Im going to assume that when you touch a part, you will morph. To do this you will need a remote event in replicatedstorage and 1 localscript and 1 normal script!
-- normal script
local part = workspace.Part
local remoteEvent = game.ReplicatedStorage.RemoteEvent
part.Touched:Connect(function(touchedmorph)
if touchedmorph.Parent:FindFirstChild("Humanoid") then
remoteEvent:FireAllClients()
end
-- localscript
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local remoteEvent = ReplicatedStorage:WaitForChild("RemoteEvent")
local function playsound()
-- search a tutorial on how to play a sound using script and insert it here!
end
remoteEvent.OnClientEvent:Connect(playsound)
Any questions? Just ask!
This discussion is preserved as it was. New answers, comments, and votes are closed.
