[EDIT] i figured out myself why this wasn't working, instead of setting an id of sound to "536642316" i had to change it to "rbxassetid://536642316" (feelin very dumb right now)
So i Scripted This Module: (Parent is ServerScriptService)
local CustomFunction = {} CustomFunction.CreateSound = function(ID, Pitch, Distance, Looped, Parent, SoundName, Volume, PlayDelay) local Sound = Instance.new("Sound", Parent) Sound.Looped = Looped Sound.MaxDistance = Distance Sound.Name = SoundName Sound.Parent = Parent Sound.PlaybackSpeed = Pitch Sound.SoundId = ID Sound.Volume = Volume wait(PlayDelay) Sound:Play() game:GetService("Debris"):AddItem(Sound, Sound.TimeLength + PlayDelay + 1) end return CustomFunction
My Script: (Not a LocalScript)
local Module = require(game:GetService("ServerScriptService"):WaitForChild("CreationModule")) CreationModule.CreateSound(536642316, math.random(95/100,120/100), 100, false, Character.Head, "Swing", 0.5, 0.2)
forget about the properties, the script should work but it throws a error:
"Failed to load sound 536642316: Unable to download sound data"
why "unable to download sound data"?
what can i do to fix this?