I tried CFraming the position of the brick, but when i turn around and open the screen it appears on my left or right in front of me.. Could you guide me please?
function openScreen() if deb == false then deb = true wait() chr.Humanoid.WalkSpeed = 0 local sb = game.ReplicatedStorage.inventoryScreen local sb2 = sb:Clone() sb2.Parent = chr sb2.CFrame = chr.Head.CFrame + Vector3.new(6,0,-2) --Right here is the prob plr.PlayerGui.UI.Adornee = sb2 plr.PlayerGui.UI.container.Visible = true end end
Try using CFrame.new instead of Vector3.new. Like this
function openScreen() if deb == false then deb = true wait() chr.Humanoid.WalkSpeed = 0 local sb = game.ReplicatedStorage.inventoryScreen local sb2 = sb:Clone() sb2.Parent = chr sb2.CFrame = chr.Head.CFrame + CFrame.new(6,0,-2) --Right here is the prob plr.PlayerGui.UI.Adornee = sb2 plr.PlayerGui.UI.container.Visible = true end end
If that does not work, then your facing the wrong way. Either way. I hope this helps!