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

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

Asked by 3 years ago
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

Log in to vote
0
Answered by 3 years ago
Edited 3 years ago

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
0
How do i do that? DriBowser 55 — 3y
0
Using the :GetPlayers() then to their PlayerGui's DiamondComplex 285 — 3y
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? DriBowser 55 — 3y
0
Could you please answer? Not to be mean or anything. DriBowser 55 — 3y
View all comments (3 more)
0
You're still waiting "for" the answer?! DiamondComplex 285 — 3y
0
I edited it. Try it now. And please, I'm rep-hungry. DiamondComplex 285 — 3y
0
It works, thank you so much! DriBowser 55 — 3y
Ad

Answer this question