I recently made an explode menu, And i want to make it so that the X offset make the explosion appear in front of the player of where the character is looking, But explosion position needs a vector3, And vector3 has a foxed position, So i want to be able to make the explosion appear in front of the player with the given X value (in studs)
Current code:
RE18.OnServerEvent:Connect(function(plr, user, X, Y, Z, Pressure, Radius)
if table.find(Allowed, plr.UserId) or admins:GetAsync(plr.UserId) then
local player = checkplr(user)
local char = game.Players:FindFirstChild(player).Character.HumanoidRootPart
local boom = Instance.new("Explosion")
boom.Parent=char
boom.BlastPressure=Pressure
boom.BlastRadius=Radius
boom.Position=Vector3.new(char.CFrame.Position.X+X,char.CFrame.Position.Y+Y,char.CFrame.Position.Z+Z)
end
end)