Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How would I make it to where you can clone an accessory from ServerStorage into the player?

local Tool = script.Parent;

enabled = true




function onActivated()
	game.ServerStorage.DOGE:Clone()
end

function onEquipped()
	Tool.Handle.OpenSound:play()
end

script.Parent.Activated:connect(onActivated)
script.Parent.Equipped:connect(onEquipped)

Above is a template I guess. I'm trying to make it to where you can equip armor, which is the DOGE, and make it clone inside your character, while removing your character's current accessories so it doesn't clip w/ them. Any help would be greatly appreciated

2 comments

0

Make a clone of a hat, and parent it to the character. Should be that simple

0

You need to be more specific with the layout of your current attempt. Giving us a template and then applying programs built off from it will definitely break.

2 answers

local Tool = script.Parent;

enabled = true




function onActivated()
    local hi = game.ServerStorage.DOGE:Clone()
    hi.Parent = game.Players.LocalPlayer.Character
end

function onEquipped()
    Tool.Handle.OpenSound:play()
end

script.Parent.Activated:connect(onActivated)
script.Parent.Equipped:connect(onEquipped)

I think this should work as long as you are using a localscript, if this does not work, try moving the local hi and hi.Parent to onEquipped() and make sure DOGE exists in ServerStorage. Or try moving it to ReplicatedStorage and changing game.ServerStorage to game.ReplicatedStorage

5 comments

0

this isnt wrong but this script is using variables from Client and server

0

will it make it to where other players can't see the accessory?

0

ok so i tested this and it said that DOGE wasnt a valid member of ServerStorage even though it is in ServerStorage

0

You postivitve it was not in another folder inside serverstorage, if not then idk

0

You postivitve it was not in another folder inside serverstorage, if not then idk

This discussion is preserved as it was. New answers, comments, and votes are closed.