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

How Do I make objects turn into another object?

Asked by 9 years ago

How do I make a crafting system where when the correct objects come in contact with each other (sorta like in stranded deep, if that makes sense) it makes the object I want it to make? This is all I have so far ( I don't know if this will even work though...):

if ing(1) == "Model Name Here" and ing(2) == "Model Name Here" then
   made = "New Tool Name Here"
end
0
Review your basics. Perci1 4988 — 9y

1 answer

Log in to vote
0
Answered by
dyler3 1510 Moderation Voter
9 years ago

Lol, I assume you're relatively new to scripting. This won't work. I'll give u an example of something that would. Let's assume this script is inside a "knife" and we're trying to make a spear by touching "stick". Here:

script.Parent.Touched:connect(function(Part)
if Part.Name=="Stick" then
Part:remove()
script.Parent:remove()
Spear=Instance.new("Part", game.Workspace)
--Adjust shape/color/size of spear here.
end
end)

This would take a stick when touched by a knife, and replace them with a spear. This is just an example of something that you might be able to work off of. If you have any questions, please leave a commet below. Hope I helped :P

(Sorry about lack of indents, i'm on my phone.)

0
Would this script work if the items touched, or if you have a knife in your inventory and your touch the script? Either way I'm trying to make a crafting mechanism where when the objects needed touch each other it would remove the other objects and replace Seeker5123 15 — 9y
0
Thanks but what I'm looking for is a script where when two objectsare touched together on the ground (or anywhere not in the player's inventory) they disappear and in their place is a new item Seeker5123 15 — 9y
Ad

Answer this question