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: Script not functioning properly

Previous Thread :: Next Thread 
tuxedoman23 is not online. tuxedoman23
Joined: 24 Apr 2009
Total Posts: 4670
18 Mar 2013 10:53 PM
I am making a script where a random number of bricks are made and positioned randomly at an offset of the previously made part. The first part has an offset of an already made brick in workspace. The problem is every brick is positioned in the same place, and the output does not give any hint at why.


Hint = game.Lighting.Hint

while true do
wait(5)


Hint:Clone().Parent = Workspace
msg = Workspace.Hint
msg.Text = "Welcome to climber v1.0. Generating new map..."
wait(5)
msg.Parent = nil

local x = Instance.new("Part", Workspace)
chgsize = math.random(5, 10)
x.Size = Vector3.new(chgsize, chgsize, chgsize)
startpoint = game.Workspace.Start
x.CFrame = startpoint.CFrame + Vector3.new(math.random(5, 10),math.random(5, 10),math.random(5, 10))
x.CFrame = CFrame.Angles(math.rad(1, 360),math.rad(1, 360),math.rad(1, 360))
x.Color = Color3.new(math.random(),math.random(),math.random())
x.Anchored = true
partname = 1
x.Name = "Part"..partname

for i = 1, math.random(100, 200) do
wait()
local x = Instance.new("Part", Workspace)
chgsize = math.random(5, 10)
x.Size = Vector3.new(chgsize, chgsize, chgsize)
findpart = game.Workspace:findFirstChild("Part"..partname)
x.CFrame = findpart.CFrame + Vector3.new(math.random(5, 10),math.random(5, 10),math.random(5, 10))
x.CFrame = CFrame.Angles(math.rad(1, 360),math.rad(1, 360),math.rad(1, 360))
x.Color = Color3.new(math.random(),math.random(),math.random())
x.Anchored = true
partname = partname + 1
x.Name = "Part"..partname
end


end
Report Abuse
tuxedoman23 is not online. tuxedoman23
Joined: 24 Apr 2009
Total Posts: 4670
18 Mar 2013 10:55 PM
I have to leave right now to go to bed. I will try to find the issue when I can..
Report Abuse
zins is not online. zins
Joined: 14 Jan 2011
Total Posts: 3394
18 Mar 2013 11:40 PM
[ Content Deleted ]
Report Abuse
captinsoap is not online. captinsoap
Joined: 24 Jan 2010
Total Posts: 9570
18 Mar 2013 11:45 PM
Clone().Parent

still works

~«stealing shopping carts since the 1930's»~
Report Abuse
tuxedoman23 is not online. tuxedoman23
Joined: 24 Apr 2009
Total Posts: 4670
19 Mar 2013 06:19 PM
Bump.
Report Abuse
tuxedoman23 is not online. tuxedoman23
Joined: 24 Apr 2009
Total Posts: 4670
19 Mar 2013 07:49 PM
Bump.
Report Abuse
tuxedoman23 is not online. tuxedoman23
Joined: 24 Apr 2009
Total Posts: 4670
19 Mar 2013 09:49 PM
Bump.
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