Box Position, Rotation etc. always 0
#1
I noticed this when I wrote a script that involved placing a Explosion object in a Box's position. Since the Position always shows up as (0.0, 0.0) no matter what, the Explosion will always spawn at that point.

I'm pretty sure this is a fault from Buildism's part and not mine, though if for some reason this code is wrong, tell me so:

Code:
local main = script.Parent --player's body.

function onCollide()
   local e = create("Explosion")
   e.Radius = 6
   e.Force = 10000
   e.Parent = game.World
   e.Position = main.Position --places it at Vec2D(0, 0), I presume
   --main.Transparency = 1 --doesn't work w/texture
   main.Parent.Health = 0
   main:remove()
end

also part transparency should affect any Texture inside it, imo
Reply


Messages In This Thread
Box Position, Rotation etc. always 0 - by technoguyx - 09-02-2012, 04:04 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)