Ad
Log in to vote
0

How do I make a plane spawn GUI?

Asked by 4 days ago

I am trying to make a spawn where the player stands on the spawn and a GUI comes up and the player can select what plane they want to fly. Then the plane will spawn in the position that I choose. For some reason the script does not seem to be working and I can not find a way to make it work. I also have multiple spawn points and multiple aircraft so I cannot just move the plane to the position I want it to spawn in as it would take a long time and the game would be very laggy.

Script:

script.parent.Touched:Connect(function(hit)
    game.StarterGui.ScreenGui.Frame.Visible = true
    if.Player.MouseButton1.Click = game.StarterGui.ScreenGui.Frame.F14 then
        game.ServerStorage["F-14D"]:Clone
    elseif.Player.MouseButton1.Click = game.StarterGui.ScreenGui.Frame.F15 then
        game.ServerStorage["F-15E"]:Clone
    elseif.Player.MouseButton1.Click = game.StarterGui.ScreenGui.Frame.F16 then
        game.ServerStorage["F-16C"]:Clone
    elseif.Player.MouseButton1.Click = game.StarterGui.ScreenGui.Frame.F22 then
        game.ServerStorage["F-22A"]:Clone
        clone:position = 10910.563, 180.806, -12150.63


    end

end)

1 answer

Log in to vote
0
Answered by 4 days ago

Here What You Doing Wrong,

  1. Player Gui is Stored inside of player in a folder named "PlayerGui" (game.Player.LocalPlayer.PlayerGui).

  2. You dont need a . after if or elseif (if Player....)

  3. Where is Player inside of your script?

Ad

Answer this question