basically, the sound wont play or get louder at all, no errors:
local player = game:GetService("Players").LocalPlayer
local sound = workspace.Main["around the clock glovey theme"]
local runService = game:GetService("RunService")
local MagnitudePart = workspace.Main
runService.RenderStepped:Connect(function()
local magnitude = (MagnitudePart.Position - player.Character.Head.Position).Magnitude
if magnitude <= 40 then
sound:Play()
elseif magnitude > 40 then
sound:Stop()
end
end)
Have you tried prints to see if the code is running?
local player = game:GetService("Players").LocalPlayer
local sound = workspace.Main["around the clock glovey theme"]
local runService = game:GetService("RunService")
local MagnitudePart = workspace.Main
runService.RenderStepped:Connect(function()
local magnitude = (MagnitudePart.Position - player.Character.Head.Position).Magnitude
if magnitude <= 40 then
print("playing sound")
sound:Play()
elseif magnitude > 40 then
print("don't play sound")
sound:Stop()
end
end)
local player = game:GetService("Players").LocalPlayer
local sound = workspace.Main["around the clock glovey theme"]
local runService = game:GetService("RunService")
local MagnitudePart = workspace.Main
runService.RenderStepped:Connect(function()
local magnitude = (MagnitudePart.Position - player.Character.Head.Position).Magnitude
if magnitude <= 40 then
sound.Playing = true
sound:Play()
elseif magnitude > 40 then
sound:Stop()
end
end)
Check if your roblox volume is off.
If this doesn’t work, then try to place the sound in soundservice.