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: Broken Script

Previous Thread :: Next Thread 
Caspxrr is not online. Caspxrr
Joined: 07 Oct 2015
Total Posts: 7433
28 Jan 2017 07:23 PM
function onTouch(hit)
if hit.Instance.new('Part01') then
Part01.position = 86, -1, 188
Part01.size = 38, 7, 38
Part01.BrickColor = 318
end
end

It doesn't spawn a block.
Report Abuse
Icillia is not online. Icillia
Joined: 19 Jan 2016
Total Posts: 2337
28 Jan 2017 07:25 PM
http://wiki.roblox.com/index.php?title=API:Vector3

Vector3.new(86,-1,188)




Report Abuse
Nyxis is not online. Nyxis
Joined: 15 Nov 2012
Total Posts: 3374
28 Jan 2017 07:31 PM
where's the connection line?
Report Abuse
Caspxrr is not online. Caspxrr
Joined: 07 Oct 2015
Total Posts: 7433
28 Jan 2017 07:52 PM
Connection what ?
Report Abuse
Nyxis is not online. Nyxis
Joined: 15 Nov 2012
Total Posts: 3374
28 Jan 2017 07:53 PM
ok bye.
Report Abuse
Disaster_Scripts is not online. Disaster_Scripts
Joined: 10 May 2016
Total Posts: 2310
28 Jan 2017 07:58 PM
Lel. He means defining #### ### function is. Every function that isn't already defined needs a ########## line to support it.
Report Abuse
Caspxrr is not online. Caspxrr
Joined: 07 Oct 2015
Total Posts: 7433
28 Jan 2017 08:03 PM
I'm pretty much a beginner at scripting,
don't ask me what connection line means if I have no idea what it means.

.-.
Report Abuse
Disaster_Scripts is not online. Disaster_Scripts
Joined: 10 May 2016
Total Posts: 2310
28 Jan 2017 08:04 PM
###### it up.
Report Abuse
Intended_Pun is not online. Intended_Pun
Joined: 10 Aug 2016
Total Posts: 4384
28 Jan 2017 08:08 PM
I'll walk you through this:

function onTouch(hit)
if hit:FindFirstChild("Part01") then --This is the proper way to check it. I have no clue what you're doing.
local Part01 = hit:FindFirstChild("Part01") --We need to make a new variable if we want to reference that part as "Part01".
Part01.position = Vector3.new(86, -1, 188) --Check out the wiki page posted above.
Part01.size = Vector3.new(38, 7, 38)
Part01.BrickColor = BrickColor.new("Artichoke") --Always use strings when changing BrickColors.
end
end

script.Parent.Touched:connect(onTouch(hitp)) --I have like 0 practice weiting connect lines like this so...
Report Abuse
swooby is not online. swooby
Joined: 30 Dec 2010
Total Posts: 1986
28 Jan 2017 08:09 PM
script.Parent.Touched:Connect(function(hit) -- when the part is hit, it will connect this to a function, hit is the part that hit it

if (i have no idea what you were checking for here) then

local Part01 = Instance.new('Part')
Part01.Position = Vector3.new (86, -1, 188) -- when changing a property with 3 values you have to use Vector3.new
Part01.Size = Vector3.new (38, 7, 38)
Part01.BrickColor = BrickColor.new('Really red')
end)


~HOBA Staff
Report Abuse
Disillusions is not online. Disillusions
Joined: 10 Jul 2011
Total Posts: 6365
28 Jan 2017 08:19 PM
THAT SCRIPT THOUGH


Report Abuse
Real_Spooky is not online. Real_Spooky
Joined: 23 Oct 2013
Total Posts: 3149
28 Jan 2017 08:21 PM
OH MY GOD THAT MADE SIGH SO LOUDLY
Report Abuse
Caspxrr is not online. Caspxrr
Joined: 07 Oct 2015
Total Posts: 7433
28 Jan 2017 08:41 PM
oml my script is a fail xp
Report Abuse
Caspxrr is not online. Caspxrr
Joined: 07 Oct 2015
Total Posts: 7433
28 Jan 2017 08:44 PM
@Intended_Pun

The 'hitp))' has a blue line under it,
Is it supposed to or nah ?
Report Abuse
swooby is not online. swooby
Joined: 30 Dec 2010
Total Posts: 1986
28 Jan 2017 08:46 PM
it would be

script.Parent.Touched:Connect(onTouch)


~HOBA Staff
Report Abuse
Caspxrr is not online. Caspxrr
Joined: 07 Oct 2015
Total Posts: 7433
28 Jan 2017 08:48 PM
I did it, but it doesn't do anything..

Report Abuse
Caspxrr is not online. Caspxrr
Joined: 07 Oct 2015
Total Posts: 7433
28 Jan 2017 09:09 PM
b
Report Abuse
Caspxrr is not online. Caspxrr
Joined: 07 Oct 2015
Total Posts: 7433
28 Jan 2017 09:10 PM
0kay okay,
If anyone can read this:

function onTouch(hit)
if hit:FindFirstChild("Part01") then
local Part01 = hit:FindFirstChild("Part01")
Part01.position = Vector3.new(86, -1, 188)
Part01.size = Vector3.new(38, 7, 38)
Part01.BrickColor = BrickColor.new("Artichoke")
end
end

script.Parent.Touched:connect(onTouch)

What is this exactly supposed to do,
Report Abuse
swooby is not online. swooby
Joined: 30 Dec 2010
Total Posts: 1986
28 Jan 2017 09:10 PM
if a brick called "Part01" his the part the script is in, it will create a new part of desired size/cords/color.


~HOBA Staff
Report Abuse
Caspxrr is not online. Caspxrr
Joined: 07 Oct 2015
Total Posts: 7433
28 Jan 2017 09:17 PM
'has the part the script is in'

So if I have a brick, that's named Part01,
when I step on it, it will create a brick with the size,color, and position I but in the script ?
Report Abuse
Caspxrr is not online. Caspxrr
Joined: 07 Oct 2015
Total Posts: 7433
28 Jan 2017 09:38 PM
b
Report Abuse
Crimsonal is not online. Crimsonal
Joined: 23 Apr 2011
Total Posts: 1795
28 Jan 2017 09:56 PM
lol
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