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

I'm making a bossfight for a camping game, but the textbutton to get a weapon won't load?

wait(5)
	killer:Destroy()
	game.Workspace.ah:Destroy()
	game.Workspace.Breaking:Play()
	wait(0.5)
	getRandomPlayer()
	CreateDialogueEvent:FireAllClients(getPlayerImage(randomPlayerId),"Not again!")
	wait(0.5)
	game.Workspace.Cave:Stop()
	wait(1)
	game.StarterGui.ScreenGui.TextButton.Visible = true -- This is the line that doesn't work.
	wait(2)
	game.ServerScriptService.bossfightScript.Disabled = false

1 answer

✓ Accepted answer

You're making it only work for new-joining players. Consider changing the TextButton of every players in their respective PlayerGui.

Give this a try:

wait(5)
    killer:Destroy()
    game.Workspace.ah:Destroy()
    game.Workspace.Breaking:Play()
    wait(0.5)
    getRandomPlayer()
    CreateDialogueEvent:FireAllClients(getPlayerImage(randomPlayerId),"Not again!")
    wait(0.5)
    game.Workspace.Cave:Stop()
    wait(1)
	for _,player in pairs(game.Players:GetPlayers()) do--this one >;3
		player.PlayerGui.ScreenGui.TextButton.Visible = true
	end
    wait(2)
    game.ServerScriptService.bossfightScript.Disabled = false

7 comments

0

How do i do that?

0

Using the :GetPlayers() then to their PlayerGui's

0

I'm sorry but i don't really understand what you mean. Can you maybe just write what I should type in the script if that's ok?

0

Could you please answer? Not to be mean or anything.

0

You're still waiting "for" the answer?!

0

I edited it. Try it now. And please, I'm rep-hungry.

0

It works, thank you so much!

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