Used the changed function wrong or I did the script wrong? [closed]
Here's the code I did. [Attempt 1] [ Game does not have FE enabled, for all attempts ]
1 | game:GetService( "Players" ).LocalPlayer.Backpack.Tool.Parent.Changed:connect( function () |
2 | local plr = game:GetService( "Players" ).LocalPlayer.Character.Name |
3 | if game:GetService( "Players" ).LocalPlayer.Backpack.Tool.Parent = = game:GetService( "Players" ).LocalPlayer.Character.Name then |
4 | script.Parent:FindFirstChild( "Frame" ).Visible = true |
6 | script.Parent:FindFirstChild( "Frame" ).Visible = false |
I maybe used the Changed function in a wrong way, but I changed a bit of things
1 | game:GetService( "Players" ).LocalPlayer.Backpack.Tool.Parent.Changed:connect( function () |
2 | local plr = game:GetService( "Players" ).LocalPlayer.Character.Name |
3 | if game:GetService( "Players" ).LocalPlayer.Backpack.Tool.Parent = = plr then |
4 | script.Parent:FindFirstChild( "Frame" ).Visible = true |
6 | script.Parent:FindFirstChild( "Frame" ).Visible = false |
Locked by RubenKan
This question has been locked to preserve its current state and prevent spam and unwanted comments and answers.
Why was this question closed?