Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to make this object rotate depending on where the player is looking?

Asked by
rexpex 45
7 years ago

Do i use lookvectors like in this script

replicatedstorage = game:GetService("ReplicatedStorage")
tool = script.Parent.Parent.Parent
bolt = replicatedstorage:FindFirstChild("RicoClass").Bolt:clone()
Counter = replicatedstorage:FindFirstChild("RicoClass").Counter
baseAtk = 15

    Counter.OnServerEvent:connect(function(player)
print(script.Parent:FindFirstChild("Charging").Value)
print("boi")
-----------------------------------------------------   
    bolt.Parent = game.Workspace
    bolt.CFrame = player.Character.RightUpperArm.CFrame
    bolt.Rotation = Vector3.new(player.Character.HumanoidRootPart.CFrame.lookVector,player.Character.HumanoidRootPart.CFrame.lookVector,player.Character.HumanoidRootPart.CFrame.lookVector) 
-----------------------------------------------------
wait(0.1)
script.Parent:FindFirstChild("Charging").Value = 0

    end)

0
its on like 13-14 rexpex 45 — 7y

Answer this question