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

How would I get the Vector3 Value for in front of a character in a script?

Asked by 3 years ago

I am trying to make a spawn part script that spawns a part right in front of the player and to do so I need to make a script like

if script.Parent.MouseButton1Click:Connect(function()
Instance.new("Part", game.Workspace)
Part.Position = Vector3.New( )

The script above may have been scuffed because I haven't really experimented with Instance.new but I hope that helps you guys further understand what I am trying to do here.

Also, if you don't know how to do this that's perfectly fine. Thanks!

0
the second argument of Instance.new() is deprecated. Instead, set the parent of the new object after its other properties have been set. SteamG00B 1633 — 3y
0
Also have to ask, do you want everyone to see the part or just the player? SteamG00B 1633 — 3y
0
you have to do 3F1VE 257 — 3y

1 answer

Log in to vote
0
Answered by
3F1VE 257 Moderation Voter
3 years ago
local ? = Instance.new("Part", game.Workspace)   ?.Position = Vector3.new(?,?,?)

always make a new instance a variable

0
your welcome 3F1VE 257 — 3y
Ad

Answer this question