Solution Found.
Thanks For All The Help!
1 Like
scripts don’t run in ServerStorage put it in ServerScriptService
1 Like
Ok, I’ll Try That! Thanks
1 Like
It still does not work Could This be because it is inside a sound?
1 Like
Maybe it’s that there’s a symbol at the end of the function declaration line, but no parentheses?
1 Like
Also you did
I think you need :Play instead of .Play
2 Likes
game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(char)
player.Chatted:Connect(function(msg)
local message = msg:lower()
if message == "hi" then
local voiceClone = script.Parent.Sound:Clone()
voiceClone.Parent = char.Head
voiceClone:Play()
wait(1)
voiceClone:Destroy()
end
end)
end)
end)
Alright so let me explain this now,
So firstly we convert the msg to lower.
I cloned the sound to the player’s head so that it sounds like it came from the player. I added wait for the sound to play then destroy it.
Make sure that the Sound is not looped.
(Have not tested this so not really sure.)
1 Like