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

How to make a part welded to a player move where your camera is moving?

Asked by 6 years ago
Edited 6 years ago

So I have code that when you click a part it creates a part and welds it to you:

01script.Parent.MouseClick:Connect(function(player)
02 
03local wel = Instance.new("Weld", workspace)
04 
05local part = Instance.new("Part", workspace)
06 
07local prt = game.ReplicatedStorage.lemon:Clone()
08 
09prt.Parent = workspace
10 
11part.Transparency = 1
12 
13part.CanCollide = false
14 
15prt.CanCollide = true
View all 59 lines...

How would I make it so it is always where your camera is moving???

When I look down, the object is not facing the same.

Does anyone know how to do this??

0
you can probably just get a loop that sets the cframe of the object to the cframe of the camera wwwdanielwww 5 — 6y

2 answers

Log in to vote
1
Answered by 6 years ago

You would need to get the camera position then divide it by .5, then add an endless loop to your part thats welded that changes the Y value by camera position/.5

Ad
Log in to vote
1
Answered by 5 years ago

Ok thanl you

Answer this question