Inserted in a serverscript inside the brick
1 | script.Parent.Touched:connect( function (Hit) |
2 | local H = Hit.Parent:FindFirstChild( "Humanoid" ) |
3 | if H then |
4 | local Player = game.Players:GetPlayerFromCharacter(Hit.Parent) |
5 | Player.PlayerGui.guiMain.frmBackground.Visible = true |
6 | Player.PlayerGui.guiMain.frmPrelims.Visible = true |
7 | Player.PlayerGui.guiMain.frmStep 3. Visible = true |
8 | end |
9 | end ) |
(I got this from the forums 4 years ago)
This is how I would do your script I believe I did what you tried once and it didn't work but this might so try it.
1 | local h = hit.Parent:FindFirstChild( "Humanoid" ) |
2 | if h then |
3 | local Pllayer = game.Players [ hit.Parent.Name ] -- This will see who is touching the part |
4 | Player.PlayerGui.guiMain.frmBackground.Visible = true |
5 | Player.PlayerGui.guiMain.frmPrelims.Visible = true |
6 | Player.PlayerGui.guiMain.frmStep 3. Visible = true |
7 | end |
8 | end ) |
Try this.
1 | script.Parent.Touched:connect( function (hit, player) |
2 | local h = hit.Parent:FindFirstChild( "Humanoid" ) |
3 | if h then |
4 | local PlayerGui = player.PlayerGui |
5 | PlayerGui.guiMain.frmBackground.Visible = true |
6 | PlayerGui.guiMain.frmPrelims.Visible = true |
7 | PlayerGui.guiMain.frmStep 3. Visible = true |
8 | end |
9 | end ) |