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

Character is not a valid member of PlayerGui ?

Asked by 1 year ago
Edited 1 year ago

Hey guys I have this error: "Character is not a valid member of PlayerGui "Players.wDaerkfeX.PlayerGui" - Serveur - Speach_Bubble:2"

Theres the script:

player = script.Parent.Parent.Parent.Parent.Parent.Parent.Parent
char = player.Character

function Click(mouse) 
    script.Click:Play()
        gui=Instance.new("BillboardGui")--Don't change the instance
        gui.Parent=char.Head
        gui.Adornee=char.Head
        gui.Size=UDim2.new(3,0,2,0)
        gui.StudsOffset=Vector3.new(0,2,0)
        text=Instance.new("ImageLabel")--Don't change the instance
        text.Image = "http://www.roblox.com/asset/?id=391507789" --Link to the specific Speach Bubble
        text.Size=UDim2.new(2,0,2,0)
        text.Position=UDim2.new(-0.520,0,-0.25,0)
        text.BackgroundTransparency = 1
        text.Parent=gui 
        wait(0.1)
        script.Parent.Parent.Parent.Chats.Visible = false
        script.Parent.Parent.Parent.Chats.Active = false
        wait(5)--Adjust time limit of Speach Bubble
        gui:remove()--Speach bubble will remove

end


script.Parent.MouseButton1Down:connect(Click)

I dont know how to fix it, I hope anyone can help me! Have a nice day!

2 answers

Log in to vote
1
Answered by 1 year ago

How about you try "player = game.Players.LocalPlayer"?

0
Its still dont work. wDaerkfeX 37 — 1y
Ad
Log in to vote
0
Answered by 1 year ago
player = script.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Parent

just add a extra parent

Answer this question