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

How Do I make objects turn into another object?

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

1 comment

0

Review your basics.

1 answer

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.)

2 comments

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

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

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