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
|
  |
| 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
|
  |
| Joined: 15 Nov 2012 |
| Total Posts: 3374 |
|
|
| 28 Jan 2017 07:31 PM |
| where's the connection line? |
|
|
| Report Abuse |
|
|
Caspxrr
|
  |
| Joined: 07 Oct 2015 |
| Total Posts: 7433 |
|
| |
|
Nyxis
|
  |
| Joined: 15 Nov 2012 |
| Total Posts: 3374 |
|
| |
|
|
| 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
|
  |
| 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 |
|
|
| |
|
|
| 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
|
  |
| 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 |
|
|
| |
|
|
| 28 Jan 2017 08:21 PM |
| OH MY GOD THAT MADE SIGH SO LOUDLY |
|
|
| Report Abuse |
|
|
Caspxrr
|
  |
| Joined: 07 Oct 2015 |
| Total Posts: 7433 |
|
|
| 28 Jan 2017 08:41 PM |
| oml my script is a fail xp |
|
|
| Report Abuse |
|
|
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
|
  |
| 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
|
  |
| 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
|
  |
| Joined: 07 Oct 2015 |
| Total Posts: 7433 |
|
| |
|
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
|
  |
| 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
|
  |
| 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
|
  |
| Joined: 07 Oct 2015 |
| Total Posts: 7433 |
|
| |
|
Crimsonal
|
  |
| Joined: 23 Apr 2011 |
| Total Posts: 1795 |
|
| |
|