Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Followed AlvinnBlox tutorial for Overhead Gui's switched it to a press of a gui and it wont work?

No errors, but this is what it said: https://gyazo.com/de1722cef7ab6f177f7eb656ec56a424 I made no mistakes with the alvinnblox side. Hierarchy of everything: https://gyazo.com/dbd0d145f3eeb1c843f51f6670f8abb2 NOTE this is for a dice rolling gui above the head. needs to be seen by all players

--Variables
local BillBoardGui = game:GetService("ServerStorage"):WaitForChild("BillBoardGui1")
    local BillBoarder = game.ServerStorage.BillboardGui1.TextLabel
local BillBoarderTextLabel = game.ServerStorage.BillboardGui1.TextLabel

--Main Script

game.Players.PlayerAdded:Connect(function(Player)
	
	local ClonedGui = BillBoardGui:Clone()
	ClonedGui.Parent = game.Workspace[Player.Name].Head

		BillBoarderTextLabel.TextTransparency = 1
	BillBoarderTextLabel.BackgroundTransparency = 1
	local d20Roled = math.random(1,20)
	BillBoarderTextLabel.Text = (d20Roled)
	BillBoarderTextLabel.TextTransparency = 0
	BillBoarderTextLabel.BackgroundTransparency = 0.2
	wait(5)
	BillBoarderTextLabel.TextTransparency = 1
	BillBoarderTextLabel.BackgroundTransparency = 1
	

	
end)
end)

thanks. Help appreciated, if you think you solved it put it as an answer, I'll give you a solved.

2 comments

0

I dont think you should use him. I used to follow his tutorials but there are a lot that are outdated and won't work. You should use TDK because he is a lot better than alvin blox.

0

You really should never use AlvinBlox, his tutorials are full of deprecated code.

2 answers

local BillBoardGui = game:GetService("ServerStorage"):WaitForChild("BillBoardGui1")

Should be:

local BillBoardGui = game:GetService("ServerStorage"):WaitForChild("BillboardGui1")

Changed "BillBoard" to "Billboard". Just by looking at the error message it was pretty clear something was wrong here.

Also remove the "end)" at line 26.

--- EDIT --- The variables "BillBoarder" and "BillBoarderTextLabel" are the same. And also, this way you are modifying the BillboardGUI inside of ServerStorage, and not the cloned one. You are also setting a Text value to a number, and changing text transparency at the beginning for no reason. I'm just gonna rewrite the entire script. Modified script:

--Variables
local BillBoardGui = game:GetService("ServerStorage"):WaitForChild("BillboardGui1")

--Main Script

game.Players.PlayerAdded:Connect(function(Player)
	repeat wait() until Player.Character ~= nil
	
	local ClonedGui = BillBoardGui:Clone()
	local TextLabel = ClonedGui.TextLabel
	local RandomNumber = math.random(1,20)
	
	ClonedGui.Parent = Player.Character.Head
	ClonedGui.Enabled = true
	
	BillBoardTextLabel.Text = tostring(RandomNumber)
	TextLabel.TextTransparency = 0
	TextLabel.BackgroundTransparency = 0.2
	wait(5)
	ClonedGui:Destroy()
end)

5 comments

0

No errors or anything, but nothing happens

0

they're literally the same thing lmao

0

They're not the same. Because of the "B" instead of a "b" the script couldn't find a matching instance. If you did what I said and nothing happens, it's probably because you are changing the properties of the BillboardGUI in serverstorage, and not the cloned one. I'm gonna edit the answer and add more details.

0

There you go, if this doesn't work then it's not a scripting problem, and instead related to the Billboard instance.

0

I also noticed you placed the script inside of a ScreenGUI.. that's not really something you should do, and if you want to trigger this from the press of a button you should use RemoteEvents.

Its simply because you didn't specify the time at which WaitForChild should time out, thus allowing the script to wait for a yield from WaitForChild indefinitely.

Ex

Workspace:WaitForChild("Part")

Will wait at this piece of code forever, or at least until the part appears, breaking the script.

Workspace:WaitForChild("Part", 1)

Will wait one second before moving on to the next code.

The message is technically just a warning though, so it wouldn't stop your script unless the WaitForChild is actually waiting indefinitely.

1 comment

0

It is waiting indefinitely. It can't find a matching instance because of a typing error. There are also many other errors in the script, refer to my answer

This discussion is preserved as it was. New answers, comments, and votes are closed.