How to make a copy position of player on a SurfaceGUI?
Sorry if my english is bad, i not from USA, but anyway, i want some help.
Here the script:
gui = script.Parent.Frame.ImageLabel
local Humanoid = script.Parent:WaitForChild(“Humanoid”)
while true do
gui.Position = Humanoid.Position
end
Maybe this script is so bad, anyway, i wanna know how to make this work, i want this so much.
Dont hate me pls i am amateur of script.
Thanks.
1 Like
I noticed a thing,if
gui = script.Parent.Frame.ImageLabel
local Humanoid = script.Parent:WaitForChild("Humanoid")
How can Humanoid,be an child of an gui?
what i suggest is:
local Gui = script.Parent.Frame.ImageLabel
game.Workspace.ChildAdded:connect(function(CharacterAdded)
if CharacterAdded.ClassName == "Model" then
if CharacterAdded.Name == game.Players:FindFirstChild(Character.Name) then
local Player = CharacterAdded
Gui.Position = Cframe.new(Player.Position)
end
end
end)
And maybe this code is not GOOD
1 Like
Ok, thanks. E agora eu sei que você e br
Kkkkkkk,obrigado,porém,o meu codigo funcionou?
1 Like
Ontem eu estava sem pc, testei aqui agora e não funcionou.
Parece que a palavra “Character” não foi encontrada. Acho que isso que está dando erro.
Sorry,it was supposed to be CharacterAdded.Name,sorry for the inconvinience.
I have to speak english,because you made an english topic…
I am ultimately confused about how is this supposed to work. Do you mind explaining more about what you are trying to do?
Either he is trying to put a SurfaceGui on a player,or he wants to make an sort of table that says the current position of all players
I want surfaceGUI follow the player. Maybe the title is not so good for understanding.
Maybe you don’t understand me, sorry if i making a lost time for you, but i want this.
What do you mean by follow the player
?
Are you looking for something like this?
Maybe he is trying to insert in a brick with an text,the/an player location.If this is the case,then:
game.Workspace.ChildAdded:connect(function(CharacterAdded)
if CharacterAdded.ClassName == "Model" then
if CharacterAdded.Name == game.Players:FindFirstChild(CharacterAdded.Name) then
game.Workspace.PartPlayerLocation.SurfaceGui.TextLabel.Text = "CharacterAdded.Position"
end
end
end)
not now, maybe i will use this but not now.
The position of surfaceGUI is the same of the player.
Like this, i will make some changes on this script. Maybe this will work to me.
Werent you supposed to use BillboardGui?Because SurfaceGui adds an UI in one of the sides of an object,but the BillboardGui,is an UI but it sort of flies.
Idknow, maybe yes? Sorry lol, i will try.
Let me tell you again,SurfaceGui adds an UI on one of the sides of an object,so it always follows an player,can you just explain us a little?Can you give the script you’re currently using?