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

How do I make a 3D shop?

Asked by 9 years ago

I have the shop Gui's made, but when I try to make the part offset from the middle, when you move around the camera the part does not stay in place.

local ang=0
while wait() do
    if game.Workspace.CurrentCamera:FindFirstChild("Part")then
        ang=ang+1 --This just makes the part rotate
        game.Workspace.CurrentCamera.Part.CFrame=CFrame.new(game.Workspace.CurrentCamera.CoordinateFrame.lookVector*3+game.Workspace.CurrentCamera.CoordinateFrame.p+Vector3.new(6,0,0))*CFrame.Angles(math.rad(ang),math.rad(ang),math.rad(ang)) --This is the formula to put the part in the middle of the screen then offset it by 6 on the x axis.
    end
end

Help?

0
Scroll over the code then click on the piece of paper with an <> on it, to view the full thing. 73epic311 13 — 9y

1 answer

Log in to vote
0
Answered by 7 years ago

Wait so are you making it so there is a shop you have to walk up to or a gui?

Ad

Answer this question