Code : while true do wait() local sound = script.Parent.Parent.Zombie script.Parent.Position = script.Parent.Position + 1+((sound.PlaybackLoudness/1000)*3.5) end
Hello, MadnessMyth!
while true do wait() local sound = script.Parent.Parent.Zombie script.Parent.Position = script.Parent.Position + Vector3.new(0, 1+((sound.PlaybackLoudness/1000)*3.5), 0) -- script.Parent.Position is a Vector3 value end
If this code don't works, please post a comment to this answer that i'll try to fix it
while true do wait() local debounce = true local vecPoint = Vector3.new(0,0,0) local closestPlayer, smallestMagnitude = nil,math.huge if debounce then for _, player in pairs(game.Players:GetPlayers()) do local distance = player:DistanceFromCharacter(vecPoint) if distance < smallestMagnitude then debounce = true smallestMagnitude = distance closestPlayer = player wait(2.5) print (distance) debounce = false end end end -- create a sound local sound = Instance.new("Sound", game.Workspace) sound.SoundId = "rbxassetid://4277136473" -- change this to your game id sound.Looped = true -- do you want it looped if yes then leave it sound.PlaybackSpeed = 1 -- make the sound loud sound.Volume = 2-- the voloume -- play the sound sound:Play()-- tells the script to play -- waits 7 seconds -- make the sound quiet sound.Volume = 0.3 end