Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

how do i make a part clone its self and puts its self in replicated storage?

Asked by
JollyDumb -21
7 years ago

how do i make a ImageButton that when u click a part from serverstorage called Sword1 clone its self and puts it self in replicated storage and also rename its self to sword and when u click a diffrent button it delets it self

i dont want u guys just to do all work u can explain or send me a link to some wiki or something

0
First, you obviously do not know how to use the :Clone() code, so I would advise you to go on YouTube and learn the basics of ROBLOX Lua. If you did already, well I do not know how to explain this. CounterBoy123 53 — 7y
0
oh i i know now i made everything work but if i make him click the button it does what it does but thats not rly what i wanted cuz if he cliks it changes for the whole server i want to make when he cliks it changes just for him JollyDumb -21 — 7y

1 answer

Log in to vote
0
Answered by 7 years ago
Edited 7 years ago

I'll try to explain it step by step.

How do I use clone?

brick = workspace.Part -- the part you want to clone.
dest = game.ReplicatedStorage -- this is the destination.


--=={{ lets get started }}==--
brickc = brick:Clone() -- "brickc" is the literal clone, its like doing b = Instance.new("Part")
brickc.Parent = dest -- putting the cloned brick in the destination which is ReplicatedStorage

Ok, But how do I make it when I click a button?

button = Instance.new("TextButton") -- this will be your button, but for reference i'm making a button

--=={{ lets get started }}==--

function myfunction() -- function that will run when you click the button.
    print"Oh no, I've been bamboozled!" -- prints "Oh no, I've been bamboozled!" in console
end -- ends function


button.MouseButton1Click:connect(myfunction­) --[[ button is the variable for your button. MouseButton1Click is an event that fires when the button is clicked with mouse 1. ":connect" starts up the function which is "myfunction"]]

And just incase you wan't to do more research...

And just incase you wan't to do more research I've linked all of the sources that would help you.

Button

Variable

Function

Parent

Clone

Lastly, If you have any more questions please ask me.

and if this was not the solution you we're looking for, I'd be more then happy to help you.

0
thx for helping i already figured eveything out on my own but i realized that i didnt want to clone and put the item in replicated storage cuz then all the players will get that item i wanted to make when a player clickes that button the script gives only him the item cuz he clicked it JollyDumb -21 — 7y
0
It was my pleasure man! T0tallyN0tATr0ll -2 — 7y
Ad

Answer this question