So I have two scripts's the first script is the main script that when you touch it and your team is by the name of Kid it changes a StringValues Value to Player Entered. The next script that is named MakeVisible detects when the String values value is changed to Player Entered.
--Main Script--
1 | --"Kid" = Team the Player must be. |
2 |
3 | script.Parent.Touched:Connect( function (hit) |
4 | if script.Parent.Parent.Parent.Workspace.Player.Team = = "Kid" then |
5 | if script.Parent.Parent.GuiPart 50. Config.BurstType.Value = = "" then |
6 | script.Parent.Parent.GuiPart 50. Config.BurstType.Value = "Player Entered" |
7 | end |
8 | end |
9 | end ) |
--MakeVisible Script--
1 | if script.Parent.Parent.Parent.Parent.GuiPart 50. Config.BurstType.Value = = "Player Entered" then |
2 | script.Parent.Visible = true |
3 | end |
Hey there! plox give me robux
To fix this problem you want to use Instance.Changed
for this stringvalue
If this doesn't work, tell me.
Example script:
1 | game.Players.Player 1. leaderstats.Cash.Changed:Connect( function () |
2 | print ( "Player1's leaderstats has changed!" ) |
3 | end ) |
To fix your problem it would be:
1 | script.Parent.Parent.Parent.Parent.GuiPart 50. Config.BurstType.Changed:Connect( function () |
2 | if script.Parent.Parent.Parent.Parent.GuiPart 50. Config.BurstType.Value = = "Player Entered" then |
3 | script.Parent.Visible = true |
4 | end |
5 | end ) |
If this helped, please mark this as the answer!