generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: help me please?

Previous Thread :: Next Thread 
brados123 is not online. brados123
Joined: 24 Nov 2012
Total Posts: 2143
27 Sep 2015 11:27 AM
how do i insert a script into a instance.new part?

here's the script i got now(the one that creates the part)

function fire()
local p = Instance.new("Part")
p.Position = script.Parent.Position
p.Size = Vector3.new(6.94, 150.48, 8.42)
p.BottomSurface = 0
p.TopSurface = 0
p.Name = "TycoonBrick"
p.Parent = script.Parent
p.Material = script.Parent.Material
p.BrickColor = script.Parent.BrickColor
Instance.new("CylinderMesh").Parent=p
Instance.new("Script").Parent =p

end


while true do
wait(4)
fire()
end


ok, so this script works, but how would i insert a script that when you touch the new part made by the script, it will kill you when you touch it?

Thank you :)




I auto accept Higher rap. Here is my trade window: http://www.roblox.com/Trade/TradeWindow.aspx?TradePartnerID=34773242
Report Abuse
brados123 is not online. brados123
Joined: 24 Nov 2012
Total Posts: 2143
27 Sep 2015 11:36 AM
bump 1

I auto accept Higher rap. Here is my trade window: http://www.roblox.com/Trade/TradeWindow.aspx?TradePartnerID=34773242
Report Abuse
SavageMunkey is not online. SavageMunkey
Joined: 10 Jun 2012
Total Posts: 200
27 Sep 2015 12:18 PM
--// Make sure you have the script ready and parented, also put what you want the script to do in the actual script.

local Script = game:service'Lighting':WaitForChild('InsertedScript') --// Contents

Fire = function()
local Part = Instance.new("Part")
Part.Position = script.Parent.Position
Part.Size = Vector3.new(6.94, 150.48, 8.42)
Part.BottomSurface = 0
Part.TopSurface = 0
Part.Name = "TycoonBrick"
Part.Parent = script.Parent
Part.Material = script.Parent.Material
Part.BrickColor = script.Parent.BrickColor
local Mesh = Instance.new("CylinderMesh",Part)
local Script_Clone = Script:Clone()
Script_Clone.Parent = Part
end;

while wait() do
wait(4)
spawn(Fire)
end;
Report Abuse
brados123 is not online. brados123
Joined: 24 Nov 2012
Total Posts: 2143
27 Sep 2015 12:47 PM


Does it have to be a local script? I need a regular?
Report Abuse
SavageMunkey is not online. SavageMunkey
Joined: 10 Jun 2012
Total Posts: 200
15 Dec 2015 10:03 PM
[Very L8 IK but why not?]
Ofc not
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image