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
 

[ Content Deleted ]

Previous Thread :: Next Thread 
Badfitz100 is not online. Badfitz100
Joined: 03 Nov 2010
Total Posts: 12591
02 Aug 2014 12:27 PM
[ Content Deleted ]
Report Abuse
xXScriptzXx is not online. xXScriptzXx
Joined: 13 Jan 2013
Total Posts: 4452
02 Aug 2014 12:31 PM
part = PART
i = part.Position
X = i.X.Scale + l
Y = i.Y.Scale + l
Z = i.Z.Scale + l
Report Abuse
Badfitz100 is not online. Badfitz100
Joined: 03 Nov 2010
Total Posts: 12591
02 Aug 2014 12:33 PM
[ Content Deleted ]
Report Abuse
cody123454321 is not online. cody123454321
Joined: 21 Nov 2009
Total Posts: 5408
02 Aug 2014 12:36 PM
Define what is "around the part" Define what you're trying to do better.
Report Abuse
Badfitz100 is not online. Badfitz100
Joined: 03 Nov 2010
Total Posts: 12591
02 Aug 2014 12:37 PM
[ Content Deleted ]
Report Abuse
cody123454321 is not online. cody123454321
Joined: 21 Nov 2009
Total Posts: 5408
02 Aug 2014 12:46 PM
So you're trying to make a puzzel game with tiles... For each part insert a value with a specific number (or use names) then check if the parts are in order respected to the Vector3 it's at. It is much better than checking globally around something.

Suedo-Code:
-- Assuming this script is by the parts
local Parts = script.Parent.Parts
local NumParts = #Parts:GetChildren()
local Checked = 0

local win = function()
print("You win!")
end

local checkWin = function()
Checked = 0
for _, v in pairs(Parts:GetChildren())do
local loc = {}
for _, n in string.gmatch(v.Name, "[^%,]+")do
table.insert(loc, tonumber(n))
end
if(v.Position.X == loc[0]) and (v.Position.Z == loc[1])then
Checked = Checked + 1
end
end
if(Checked == NumParts)then
win()
end
end
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