So i made a radio and a gui. In the gui i have a button and i want when i press it to change my radio skin. I already scripted this but does not work. Some help?
local plr = game.Workspace:WaitForChild(player.Name)
also i used destroy() to test if it works but does not even destroy the radio from my back
Is this code in a LocalScript? Also, where are the gui and script located?
Yes its in a LocalScript. the gui goes into the PlayerGui when the radio is equiped
you can do .LocalPlayer instead of the way you’ve done it.
Don’t believe .PlayerAdded events fire within local scripts.
I want the skin to be visible to everyone
Alright let me rewrite this for you.
In the LocalScript:
local remote = game.ReplicatedStorage.ChangeSkin --put a RemoteEvent called "ChangeSkin" in ReplicatedStorage
In a regular Script in ServerScriptService:
I don’t get why you have used a player added function in a local script. Also if you were to change skin from a local script it would only show for the player who has the radio on, you must use a remote event to transfer it to server side.
I know. It wasn’t me the person who wrote it. It was my brother. Anyways thanks for helping him out guys.
For future reference, you should probably use a more descriptive title.