daily pastebin goal
58%
SHARE
TWEET

Untitled

a guest Nov 8th, 2018 100 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
  1. function GetSpawnPoint(map,mapMaxHeight)
  2.     local outside,raypos,raydir;
  3.     local modelSize = map.Size;
  4.     local foundPoint;
  5.    
  6.     local vectorCheck;
  7.     print(mapMaxHeight)
  8.     while true do
  9.         wait()
  10.         --outside = map:GetModelCFrame() * CFrame.new(math.random(-modelSize.X/2,modelSize.X/2),-modelSize.Y,math.random(-modelSize.Z/2,modelSize.Z/2));
  11.         outside = map.CFrame * CFrame.new(math.random(-(modelSize.X/2),modelSize.X/2),mapMaxHeight,math.random(-(modelSize.Z/2),modelSize.Z/2));
  12.         raypos = outside.p;
  13.         raydir = ((outside.p - Vector3.new(0,-(mapMaxHeight*2),0)) - outside.p).unit * 9999;
  14.        
  15.         --[[local tBlock = Instance.new("Part", workspace); --Test to see where the ray origin is
  16.         tBlock.Anchored = true
  17.         tBlock.BrickColor = BrickColor.new("Bright green");
  18.         tBlock.Size = Vector3.new(10,10,10);
  19.         tBlock.CFrame = outside
  20.         debris:AddItem(tBlock,.5);]]
  21.        
  22.         local ray = NewRay(raypos, raydir);
  23.        
  24.         local hit,pos = workspace:FindPartOnRayWithIgnoreList(ray, characterFile:GetChildren());
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top