Hey, I’m trying to make a tool to spawn an object where the player is facing but I cannot get it to work. I’ve tried using LookVector which I cannot get to work…
-- --/Services + Main Vars\--
local REPS = game:GetService("ReplicatedStorage")
local tweenService = game:GetService("TweenService")
local weaponSkill_Objects = REPS:WaitForChild("Weapon_Skill_Objects")
--/Object\--
local slashEffect = weaponSkill_Objects:WaitForChild("SlashEffect")
--/Events + Tool\--
local tool = script.Parent
local startAirSlash = tool:WaitForChild("StartAirSlash")
startAirSlash.OnServerEvent:Connect(function(plr, char)
local cloneSlashEffect = slashEffect:Clone()
cloneSlashEffect.Parent = workspace
local humRP = char:FindFirstChild("HumanoidRootPart")
print(humRP)
local lookVector = char.Head.CFrame.LookVector
print(lookVector)
cloneSlashEffect.Position = char.Head.Position + lookVector * 5
cloneSlashEffect.Orientation = Vector3.new(-30, -90, 0)
end)
Thanks!
robloxapp-20220618-1619583.wmv (1.8 MB) – Video