I tried using both worldtoscreenspace and worldtowiewport things but I havent had much success.
local function Explode( _wp , dt )
timer += dt
local _frame = math.round( fps * timer ) + 1
local _pos = { ((_frame - 1)%size[1]), math.floor( ( (_frame - 1)/size[1] ) ) }
Image.Position = UDim2.new( _pos[1], 0, _pos[2], 0 )
local _wtsp = Camera:WorldToViewportPoint( _wp ) -- And here
Frame.Position = UDim2.new( _wtsp.X, 0, _wtsp.Y, 0 ) --Here
if _frame == totalFrames then
state = 0
timer = 0
Image.Visible = false
end
end
Yes i know its a mess I wanna get it working before I actually start refactoring and making it usably pretty.
But when I try to use either the absolute position absolutely skyrockets.