#server-sided script thing

1 messages · Page 1 of 1 (latest)

queen plinth
#

I have a script that gets sounds from replicated storage that are placed into the player to act as the players walking sound,
it works perfectly, but I want to change it to where some of the sounds ids get replaced if they player has a specific name etcetc

I cant do this through local scripts cause it only affects the client and i want it to affect the server.

So;
I need a server-sided script in the sound value that waits for its parent to be the player before changing the id, but I have no idea how to make it wait to change the id before its parent is the specific player, how would I make it wait until the parent value is what I want it to be?

crisp night
#

probably you can listen to the parent changed

#

like getpropertychangedsignal("Parent")

queen plinth
#

never heardof that one before but i can try it

#

sound = script.Parent

sound:GetPropertyChangedSignal("Parent"):Connect(function()
if script.Parent.Parent == "ConstantCobra" then
sound.SoundId = "rbxassetid://0"
end
end)

#

would that work?

crisp night
#

yep should work

queen plinth
#

fuck it doesnt

crisp night
#

wheres the server script

queen plinth
#

oh maybe i did it wrong it should have 1 extra parent since its playing through the humanoidrootpart

queen plinth
crisp night
#

might not work idk then

#

u can try changing the run context to server but i would prob put the script somewhere else

queen plinth
#

maybe im going about it the wrong way

#

i could try have a script that just waits for the specific names of the sounds in the player through the findfirst or waitforchild things then changing them if it meets the criteria

#

but itd need to be serversided so i cant use a local script

#

i could try a server script in the local character

#

doesnt seem to work either

supple patrol
queen plinth
#

never heard of that but bet ill give 'er a shot

#

thank you

queen plinth
#

OK so

#

server sided scripts just dont work when in the sound part

#

local scripts do

#

but what i need

#

has to be server sided