So I am trying to make a game with a laser that will automatically lock on to you via script and weld:
wait(2)
local RunService = game:GetService('RunService')
local Weld = Instance.new("WeldConstraint")
script.Parent.Laser.Ball.CFrame = script.Parent.Parent.HumanoidRootPart.CFrame
Weld.Part0 = script.Parent.Laser.Ball
Weld.Part1 = script.Parent.Parent.HumanoidRootPart
while wait() do
script.Parent.Laser.Ball.CFrame = script.Parent.Parent.HumanoidRootPart.CFrame + Vector3.new(0,-1,0)
Weld.Part0 = script.Parent.Laser.Ball
Weld.Part1 = script.Parent.Parent.HumanoidRootPart
script.Parent.Parent.Humanoid.HipHeight = script.Parent.Humanoid.HipHeight
RunService.RenderStepped:Wait()
end
But the RenderStepped never works.
I tried using render stepped before but it never works now…
I don’t know if you need to use a render stepped only on the client or the server, because I am trying to move a drone’s laser to the player’s Humanoid.