I need help with what I’ve stated in the topic subject.
Basically this is demonstrated in the game phantom forces where if you zoom in using your scope a dot will be created on the screen representing where the player has to shoot for the projectile to hit the players head even if he is walking in a direction.
The projectile has velocity and is affected by gravity.
local DotOnTheScreenWherePlayersHeadWillBe = script.BillboardGui
local Dude = game.Players.LocalPlayer
for i, Players in pairs(game.Workspace:GetChildren()) do
if Players:FindFirstChild("Head") and Players.Name ~= Dude.Name then
local ClonedDotOnTheScreenWherePlayersHeadWillBe = DotOnTheScreenWherePlayersHeadWillBe:Clone()
ClonedDotOnTheScreenWherePlayersHeadWillBe.Parent = Players.Head
end
end
The question was not how to put a billboard GUI on the screen, I am aware how to do that, my question was placing a dot on the screen where the players head WILL be calculated with the bullets trajectory.
Your question reminds me of this video.
This video covers hitting a moving target, where both the target and your projectile move in certain predetermined ways, such as in a straight line with added gravity.
You could use the formula + explanation given in this video to create a function that outputs the desired 3D position, and then convert that to a 2D location.