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

Making Objects in Guis?

Asked by 8 years ago

Hey,

Note: I am a very advanced scripter, so don't be afraid do use complex grammar and/or scripting terminology.

I was wondering how to make players have a 3D part/model in their guis? I've seen many games having it. I've tried making the part offset in front of the camera, then realized that it could still affect the player.

My Code:

repeat wait() until script.Parent.Parent.Character

local part = Instance.new("Part",game.Workspace)
part.Anchored = true
part.CanCollide = false
local char = script.Parent.Parent.Character
local cam = game.Workspace.CurrentCamera
local mouse = game.Players.LocalPlayer:GetMouse()

game.Players.LocalPlayer.CameraMode = "LockFirstPerson"
cam.Changed:connect(function()
    part.CFrame = cam.CoordinateFrame + (cam.CoordinateFrame.lookVector*2)
end)

If anyone out there know how to help, I'd be very appreciative.

Thanks ~ObscureEntity

1
You can't put a part 'in' a gui. What you're thinking of is probably just a screen shot of the wanted model, then putting it in an ImageLabel. Perci1 4988 — 8y
0
No, There's games that have rotating items in their guis. ObscureEntity 294 — 8y
0
Yes, it somehow takes a screenshot of the item, then puts it into an imagelabel. TheDeadlyPanther 2460 — 8y
0
No, it positions the part relative to the camera where the gui is located, CloneTrooper1019 made a module for doing this easily YellowoTide 1992 — 8y
0
Could you send me the moduel for this? Thanks. ObscureEntity 294 — 8y

1 answer

Log in to vote
-1
Answered by
22ron 0
8 years ago

There is a plugin for that look it up :P

Ad

Answer this question