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 » Scripting Helpers
Home Search
 

Re: Help on a splashy script...

Previous Thread :: Next Thread 
Jasonrocks99 is not online. Jasonrocks99
Joined: 16 May 2009
Total Posts: 8096
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 is not online. 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
CODsniperkid is not online. CODsniperkid
Joined: 17 Jul 2009
Total Posts: 872
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
CODsniperkid is not online. CODsniperkid
Joined: 17 Jul 2009
Total Posts: 872
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
Jasonrocks99 is not online. Jasonrocks99
Joined: 16 May 2009
Total Posts: 8096
29 Jul 2011 07:21 PM
The splashes aren't going out still...
Report Abuse
CODsniperkid is not online. CODsniperkid
Joined: 17 Jul 2009
Total Posts: 872
29 Jul 2011 07:22 PM
Any errors(red text...) in the Output box? Paste those here.

~COD~
Report Abuse
Cliff86 is not online. 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
Jasonrocks99 is not online. Jasonrocks99
Joined: 16 May 2009
Total Posts: 8096
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
CODsniperkid is not online. CODsniperkid
Joined: 17 Jul 2009
Total Posts: 872
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 is not online. 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
Jasonrocks99 is not online. Jasonrocks99
Joined: 16 May 2009
Total Posts: 8096
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
CODsniperkid is not online. CODsniperkid
Joined: 17 Jul 2009
Total Posts: 872
29 Jul 2011 07:49 PM
No output, no errors, no service.

~COD~
Report Abuse
Jasonrocks99 is not online. Jasonrocks99
Joined: 16 May 2009
Total Posts: 8096
29 Jul 2011 07:50 PM
It says at line 30, it has that (EOF) expected near end thing...
Report Abuse
WishNite is not online. 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
CODsniperkid is not online. CODsniperkid
Joined: 17 Jul 2009
Total Posts: 872
29 Jul 2011 07:52 PM
Lol easy error fix. You should have 3 ends by the look of your script.

~COD~
Report Abuse
Jasonrocks99 is not online. Jasonrocks99
Joined: 16 May 2009
Total Posts: 8096
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 is not online. 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
Jasonrocks99 is not online. Jasonrocks99
Joined: 16 May 2009
Total Posts: 8096
29 Jul 2011 07:57 PM
Well I took off an "end" and no error. But no splash either. >_>
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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