and this . So in a certain rotation it displays correctly but otherwise it doesn’t. How would I get it to position in the front always no matter what position it is facing
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
local HRP = Character.HumanoidRootPart
local effects = {}
local randomNumber = math.random(1,5)
for i = 1, randomNumber do
local effect = game.Workspace.AirPunch:Clone()
effect.CFrame = HRP.CFrame * CFrame.new(Vector3.new(10, math.random(1,5), 10) * HRP.CFrame.lookVector)
effect.Parent = workspace
table.insert(effects, (#effects+1), effect) -- Insert into effects table
end
wait(5)
for i, v in pairs(effects) do
v:Destroy()
end
local HRP = Character.HumanoidRootPart
local effects = {}
local randomNumber = math.random(1,5)
for i = 1, randomNumber do
local effect = game.Workspace.AirPunch:Clone()
effect.CFrame = HRP.CFrame:ToWorldSpace(CFrame.new(0, math.random(1,5), 0))
effect.Parent = workspace
table.insert(effects, (#effects+1), effect) -- Insert into effects table
end
wait(5)
for i, v in pairs(effects) do
v:Destroy()
end
I got this when their faced in a opposite direction from the world.
And if their not I got what I want:
Here’s the code:
local Torso = Character.Torso
local effects = {}
local randomNumber = math.random(1,5)
for i = 1, randomNumber do
local effect = game.Workspace.AirPunch:Clone()
effect.CFrame = Torso.CFrame:ToWorldSpace(CFrame.new(math.random(1,10),math.random(1,5), math.random(1,10)))
effect.Parent = workspace
table.insert(effects, (#effects+1), effect) -- Insert into effects table
end
wait(5)
for i, v in pairs(effects) do
v:Destroy()
end