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: Fix this.

Previous Thread :: Next Thread 
Igneo is not online. Igneo
Joined: 24 Apr 2011
Total Posts: 75
28 Jul 2011 09:31 PM
mode = true
width = 2
height = 2

function onButton1Down(mouse)
print(mode)
Hit = mouse.hit
if Hit==nil then return end

if mode == true then
posx = mouse.hit.p.x
posy = mouse.hit.p.y
posz = mouse.hit.p.z
else
posx2 = mouse.hit.p.x
posy2 = mouse.hit.p.y
posz2 = mouse.hit.p.z
p = Instance.new("Part")
p.BrickColor = BrickColor.new("Dark stone grey")
p.Material = Enum.Material.Slate
p.TopSurface = 0
p.BottomSurface = 0
p.Name = "MountainPart"
p.formFactor = 3
p.Anchored = true
p.Parent = game.Workspace
p.Size = Vector3.new(width,height,(Vector3.new(posx,posy,posz) - mouse.hit.p).magnitude)
p.CFrame = CFrame.new(Vector3.new((posx+posx2)/2,(posy+posy2)/2,(posz+posz2)/2))

p.CFrame = CFrame.new(p.Position, mouse.hit.p)
end

mode = not mode
end

function onS(mouse)
mouse.Button1Down:connect(function() onButton1Down(mouse) end)
end
script.Parent.Selected:connect(onS)


When I click I want it so its streams rocks instead of clicking once-one I need it so it does like 30.
Report Abuse
darksoul4930 is not online. darksoul4930
Joined: 29 Feb 2008
Total Posts: 472
28 Jul 2011 09:33 PM
mode = true
width = 2
height = 2

function onButton1Down(mouse)
print(mode)
Hit = mouse.hit
if Hit==nil then return end --Its because of this part.

if mode == true then
posx = mouse.hit.p.x
posy = mouse.hit.p.y
posz = mouse.hit.p.z
else --And this part.
posx2 = mouse.hit.p.x
posy2 = mouse.hit.p.y
posz2 = mouse.hit.p.z
p = Instance.new("Part")
p.BrickColor = BrickColor.new("Dark stone grey")
p.Material = Enum.Material.Slate
p.TopSurface = 0
p.BottomSurface = 0
p.Name = "MountainPart"
p.formFactor = 3
p.Anchored = true
p.Parent = game.Workspace
p.Size = Vector3.new(width,height,(Vector3.new(posx,posy,posz) - mouse.hit.p).magnitude)
p.CFrame = CFrame.new(Vector3.new((posx+posx2)/2,(posy+posy2)/2,(posz+posz2)/2))

p.CFrame = CFrame.new(p.Position, mouse.hit.p)
end

mode = not mode
end

function onS(mouse)
mouse.Button1Down:connect(function() onButton1Down(mouse) end)
end
script.Parent.Selected:connect(onS)

I'm not sure what its suppose to do, but you need to change those two.
Report Abuse
darksoul4930 is not online. darksoul4930
Joined: 29 Feb 2008
Total Posts: 472
28 Jul 2011 09:36 PM
mode = true
width = 2
height = 2

function onButton1Down(mouse)
print(mode)
Hit = mouse.hit
if Hit==nil then return end

if mode == true then
posx = mouse.hit.p.x
posy = mouse.hit.p.y
posz = mouse.hit.p.z
else --This part
posx2 = mouse.hit.p.x
posy2 = mouse.hit.p.y
posz2 = mouse.hit.p.z
p = Instance.new("Part")
p.BrickColor = BrickColor.new("Dark stone grey")
p.Material = Enum.Material.Slate
p.TopSurface = 0
p.BottomSurface = 0
p.Name = "MountainPart"
p.formFactor = 3
p.Anchored = true
p.Parent = game.Workspace
p.Size = Vector3.new(width,height,(Vector3.new(posx,posy,posz) - mouse.hit.p).magnitude)
p.CFrame = CFrame.new(Vector3.new((posx+posx2)/2,(posy+posy2)/2,(posz+posz2)/2))

p.CFrame = CFrame.new(p.Position, mouse.hit.p)
end

mode = not mode
end

function onS(mouse)
mouse.Button1Down:connect(function() onButton1Down(mouse) end)
end
script.Parent.Selected:connect(onS)

Scratch the top post, it meant to put just the else.
Report Abuse
Igneo is not online. Igneo
Joined: 24 Apr 2011
Total Posts: 75
28 Jul 2011 09:36 PM
I know that it's just I don't know how.
Report Abuse
darksoul4930 is not online. darksoul4930
Joined: 29 Feb 2008
Total Posts: 472
28 Jul 2011 09:37 PM
Then you will have to figure out how, sorry. :(
Report Abuse
unknown89089 is not online. unknown89089
Joined: 21 Aug 2008
Total Posts: 2961
28 Jul 2011 09:38 PM
for i = 1,30 do
--part stuff
end
Report Abuse
Igneo is not online. Igneo
Joined: 24 Apr 2011
Total Posts: 75
28 Jul 2011 10:13 PM
?
Report Abuse
8Bawl is not online. 8Bawl
Joined: 24 Jun 2011
Total Posts: 544
28 Jul 2011 10:39 PM
Wow somones demanding
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