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

How do i make this part face the place without using a weld script??

Asked by
rexpex 45
7 years ago

Im trying to made a script that spawns a lightning bolt in front of a player but when i try to rotate it, it only goes a single way.

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.HumanoidRootPart.CFrame + Vector3.new(player.Character.HumanoidRootPart.CFrame.lookVector,5,0)
bolt.Rotation = Vector3.new(100,0,0)
-----------------------------------------------------
wait(0.1)
script.Parent:FindFirstChild("Charging").Value = 0

    end)

0
Nice tabbing. OldPalHappy 1477 — 7y
0
?? rexpex 45 — 7y

Answer this question