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 » Scripters
Home Search
 

Re: I need some major help..

Previous Thread :: Next Thread 
LordMatthewII is not online. LordMatthewII
Joined: 20 Aug 2011
Total Posts: 10873
07 Aug 2014 09:18 AM
Well I've posted this in SH before, and I've tried doing it myself, but it's just not working, and I got no reply, so I come here with a YT video showing whats wrong too.

I need to find out what side of this "Brick" I am standing on, my current system doesn't work to well.
Could you please try to fix it, or help me figure it out? It's okay if you redo my math.




--Not my entire script, just the main parts

function ray(part1,part2)
local ray=Ray.new(part1.Position,(Vector3.new(part1.Position.X,part2.Y,part2.Z)-part1.Position).Unit*10) -- sends ray from the torsos X position to the mouse.Hit.p's Z and Y
local part,position=workspace:FindPartOnRayWithIgnoreList(ray,{torso})
return part
end

mouse.Button1Down:connect(function()
local target=mouse.Target
if target and torso and char.Humanoid.Health>0 then
if target.Name=="Bar" then
local item=ray(torso,mouse.Hit.p)
if item and item.Name=="Bar" then
local ix=item.Position.X
local iz=item.Position.Z
local tx=torso.Position.X
local tz=torso.Position.Z
local topright=false
local topleft=false
local botright=false
local botleft=false
local side
if ix > tx then
topright=true
end
if iz > tz then
topleft=true
end
if tx > iz then
botright=true
end
if tz > ix then
botleft=true
end
if topright and topleft then
side=1
end
if topleft and botright then
side=2
end
if botright and botleft then
side=3
end
if botleft and topright then
side=4
end
print(side)
else
print("NOPE")
end
end
end
end)
Report Abuse
LordMatthewII is not online. LordMatthewII
Joined: 20 Aug 2011
Total Posts: 10873
07 Aug 2014 09:18 AM
https://www.youtube.com/watch?v=CfdqawGehbg&feature=youtu.be
Report Abuse
LordMatthewII is not online. LordMatthewII
Joined: 20 Aug 2011
Total Posts: 10873
07 Aug 2014 10:35 AM
:/
Report Abuse
dogwarrior24 is not online. dogwarrior24
Joined: 10 Nov 2010
Total Posts: 1401
07 Aug 2014 03:54 PM
wot hapnd 2 ur hed
Report Abuse
LordMatthewII is not online. LordMatthewII
Joined: 20 Aug 2011
Total Posts: 10873
07 Aug 2014 08:50 PM
I did a glitch, but I seriously need some help.
Report Abuse
LordMatthewII is not online. LordMatthewII
Joined: 20 Aug 2011
Total Posts: 10873
07 Aug 2014 08:54 PM
This entire broken block of code is trying to tell me what, of the four sides of the bar, I am on.

Please help me..


local ix=item.Position.X
local iz=item.Position.Z
local tx=torso.Position.X
local tz=torso.Position.Z
local topright=false
local topleft=false
local botright=false
local botleft=false
local side
if ix > tx then
topright=true
end
if iz > tz then
topleft=true
end
if tx > iz then
botright=true
end
if tz > ix then
botleft=true
end
if topright and topleft then
side=1
end
if topleft and botright then
side=2
end
if botright and botleft then
side=3
end
if botleft and topright then
side=4
end
print(side)
Report Abuse
ScriptGuilder is not online. ScriptGuilder
Joined: 07 Aug 2014
Total Posts: 848
08 Aug 2014 03:23 AM
hmm, ik that you need to do something


Nursing a baby pinecone back to health
Report Abuse
LordMatthewII is not online. LordMatthewII
Joined: 20 Aug 2011
Total Posts: 10873
08 Aug 2014 09:04 AM
:/
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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