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 Spawn A Part/Model By Stepping On A Part?

I'm Pretty Much A Noob At Scripting, But Can I Make It So That When You Step On A Part, It Will Spawn Multiple Parts Or A Model In A Certain Location?

For Example: I Made A Place For A Button To Go, You Step On That, It Spawns Let's Say A Bridge, And You Make It To The Other Side And The Bridge Despawns In "x" Amount Of Time.

I've Tried Multiple Times And I've Looked Up Tutorials And On The Wikia But I Haven't Found Anything Out There.

Any Help Would Be Very Much Appreciated And Try To Be As Specific As Possible =) ~Thx!

1 comment

0

You should be using the official Roblox Wiki, not the Wikia, which is maintained by members of the Roblox community. http://wiki.roblox.com/?title=Scripting

1 answer

Well, first Try to learn to script from the wiki. If i understand that correctly then you could do it like this.

local RemoveTime = 10 -- The time to destroy the model.
script.Parent.Touched:connect(function()
	game.ServerStorage.Models:FindFirstChild('MODELNAME'):Clone().Parent = game.Workspace.SpawnedThings 
	wait(RemoveTime) -- How long it will wait to destroy the model.
	game.Workspace.SpawnedThings:FindFirstChild('MODELNAME'):Destroy()
end

That should do it. im pretty sure you could do it another way but this is the way i know how to do it if i understand that you wrote.

2 comments

0

Too many comments, makes it even even harder to read.

0

well, it is pretty ezy to read now.

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