1 | local button 1 = workspace [ "Tycoon Map" ] [ "Start Pad 1" ] |
2 | local GUI = workspace.Parent.StarterGui [ "Type Menu GUI" ] |
3 |
4 | local Start = function () |
5 | if button 1. Touched = true then |
6 | GUI.Enabled = = true |
7 | end |
8 | end |
Solution:
1 | --Place this script inside the "Start Pad 1" part. |
2 |
3 | script.Parent.Touched:Connect( function (hit) --function fires when part is touched, no need for an if statement |
4 | if not hit.Parent:FindFirstChild( "Humanoid" ) then return end --making sure it's a human touching the part |
5 | local plr = game.Players:GetPlayerFromCharacter(hit.Parent) --getting the player |
6 | local GUI = plr.PlayerGui:WaitForChild( "Type Menu GUI" ) --Your gui, we need to do plr.PlayerGUI instead of plr.StarterGui |
7 | GUI.Enabled = true |
8 |
9 | end ) |