|
| 29 Jul 2011 07:09 PM |
Can you help out a scripting newb like me? :/
print("Yey Splash by Jasonrocks99")
local Pool = script.Parent
function onTouched(hit) print("Pool hit")
local --->(Raft?)<--- = hit.Parent:findFirstChild--->("???")<---
if (-->???<-- ~= nil ) then for i =1,2 do local Splash = Instance.new("Part") Splash.Parent = game.Workspace Splash.Position = Raft.Modeling.Modelerz.Modeler.Bumper.Position + Vector3.new(math.random(-3,3),math.random(-3,3),math.random(-3,3)) Splash.Shape = 0 Splash.formFactor = "Symmetric" Splash.Name = "Splash" Splash.BrickColor = Pool.BrickColor Splash.Reflectance = 0.5 Splash.Transparency = 0.5 Splash.TopSurface = "Smooth" Splash.BottomSurface = "Smooth" Splash.Size = Vector3.new(1,1,1)
game:GetService("Debris"):AddItem(Splash, .50) end end end
See, when my Raft is suppose to touch this water it will splash, but I can't set it to the raft's parts hitting it and will make it splash, can somebody help me?
The raft consists of many layers that I have modeled all, and I made some (weird) names, and here:
Raft > Modeling > Modelerz > Modeler > Bumper - (Brick (When this brick hits the water, it's the one that is suppose to make it splash ))
I'm sorry if it looks a bit complicated, i'll help explain it more.
|
|
|
| Report Abuse |
|
|
Cliff86
|
  |
| Joined: 01 Mar 2008 |
| Total Posts: 216 |
|
|
| 29 Jul 2011 07:12 PM |
function onTouched(hit) print("Pool hit")
if hit.Parent.Name ~= "Raft" then return end
for i =1,2 do local Splash = Instance.new("Part")
etc.... |
|
|
| Report Abuse |
|
|
|
| 29 Jul 2011 07:13 PM |
print("Yey Splash by Jasonrocks99")
local Pool = script.Parent
function onTouched(hit) print("Pool hit")
local Raft = hit.Parent:findFirstChild("Brick")
if Raft ~= nil then for i =1,2 do local Splash = Instance.new("Part") Splash.Parent = game.Workspace Splash.Position = Raft.Modeling.Modelerz.Modeler.Bumper.Position + Vector3.new(math.random(-3,3),math.random(-3,3),math.random(-3,3)) Splash.Shape = 0 Splash.formFactor = "Symmetric" Splash.Name = "Splash" Splash.BrickColor = Pool.BrickColor Splash.Reflectance = 0.5 Splash.Transparency = 0.5 Splash.TopSurface = "Smooth" Splash.BottomSurface = "Smooth" Splash.Size = Vector3.new(1,1,1)
game:GetService("Debris"):AddItem(Splash, .50)
end end
end
script.Parent.Touched:connect(onTouched)
~COD~ |
|
|
| Report Abuse |
|
|
|
| 29 Jul 2011 07:14 PM |
Oyus... I made a mistake.. Sorry, I am use to coding things with humanoids touching and not bricks.
The other guy is right with the first part.
~COD~ |
|
|
| Report Abuse |
|
|
|
| 29 Jul 2011 07:21 PM |
| The splashes aren't going out still... |
|
|
| Report Abuse |
|
|
|
| 29 Jul 2011 07:22 PM |
Any errors(red text...) in the Output box? Paste those here.
~COD~ |
|
|
| Report Abuse |
|
|
Cliff86
|
  |
| Joined: 01 Mar 2008 |
| Total Posts: 216 |
|
|
| 29 Jul 2011 07:23 PM |
:O
post the new script :O
listen to COD hes smart too :O |
|
|
| Report Abuse |
|
|
|
| 29 Jul 2011 07:39 PM |
print("Yey Splash by Jasonrocks99")
local Pool = script.Parent
function onTouched(hit) print("Pool hit")
if hit.Parent.Name ~= "Raft" then return end
for i =1,2 do local Splash = Instance.new("Part") Splash.Parent = game.Workspace Splash.Position = Raft.Modeling.Modelerz.Modeler.Bumper.Position + Vector3.new(math.random(-3,3),math.random(-3,3),math.random(-3,3)) Splash.Shape = 0 Splash.formFactor = "Symmetric" Splash.Name = "Splash" Splash.BrickColor = Pool.BrickColor Splash.Reflectance = 0.5 Splash.Transparency = 0.5 Splash.TopSurface = "Smooth" Splash.BottomSurface = "Smooth" Splash.Size = Vector3.new(1,1,1)
game:GetService("Debris"):AddItem(Splash, .50)
end end
end
script.Parent.Touched:connect(onTouched)
Sorry guys D: |
|
|
| Report Abuse |
|
|
|
| 29 Jul 2011 07:42 PM |
I do not believe the "Splash.BrickColor = Pool.BrickColor" line would work. I'm pretty sure you need "Splash.BrickColor = BrickColor.new(Pool.BrickColor)" Or something like that. Why do you need to match the Pool color? Just look at the pool color and copy the name? lol
~COD~ |
|
|
| Report Abuse |
|
|
Cliff86
|
  |
| Joined: 01 Mar 2008 |
| Total Posts: 216 |
|
|
| 29 Jul 2011 07:44 PM |
print("Splash Script By Cliff86 and CODsniperkid") --Only error i found :P
local Pool = script.Parent
function onTouched(hit) print("Pool hit")
if hit.Parent.Name ~= "Raft" then return end
for i =1,2 do local Splash = Instance.new("Part") Splash.Parent = game.Workspace Splash.Position = Raft.Modeling.Modelerz.Modeler.Bumper.Position + Vector3.new(math.random(-3,3),math.random(-3,3),math.random(-3,3)) Splash.Shape = 0 Splash.formFactor = "Symmetric" Splash.Name = "Splash" Splash.BrickColor = Pool.BrickColor Splash.Reflectance = 0.5 Splash.Transparency = 0.5 Splash.TopSurface = "Smooth" Splash.BottomSurface = "Smooth" Splash.Size = Vector3.new(1,1,1)
game:GetService("Debris"):AddItem(Splash, .50)
end end
end
|
|
|
| Report Abuse |
|
|
|
| 29 Jul 2011 07:49 PM |
| It has some error when I post my output altogether, and I tried putting it seperate but it has that error... |
|
|
| Report Abuse |
|
|
|
| 29 Jul 2011 07:49 PM |
No output, no errors, no service.
~COD~ |
|
|
| Report Abuse |
|
|
|
| 29 Jul 2011 07:50 PM |
| It says at line 30, it has that (EOF) expected near end thing... |
|
|
| Report Abuse |
|
|
WishNite
|
  |
| Joined: 11 Feb 2009 |
| Total Posts: 15828 |
|
|
| 29 Jul 2011 07:51 PM |
| EOF means it has too little or too many ends. |
|
|
| Report Abuse |
|
|
|
| 29 Jul 2011 07:52 PM |
Lol easy error fix. You should have 3 ends by the look of your script.
~COD~ |
|
|
| Report Abuse |
|
|
|
| 29 Jul 2011 07:53 PM |
I'll admit it...
I'm at the stage where I still get scripts from free models and edit them.
I edited it, with all those ends there, so I don't really know what happened. |
|
|
| Report Abuse |
|
|
WishNite
|
  |
| Joined: 11 Feb 2009 |
| Total Posts: 15828 |
|
|
| 29 Jul 2011 07:57 PM |
Delete an end at the bottom.
That should fix the EOF problem. |
|
|
| Report Abuse |
|
|
|
| 29 Jul 2011 07:57 PM |
| Well I took off an "end" and no error. But no splash either. >_> |
|
|
| Report Abuse |
|
|