Basically I am trying to replicate a Ultimate Driving Westover Islands where they is a image of a Skyline probably and if you click it than press spawn the certain model spawns. To make this clear I need a script where I can put inside a yes button or a image button where if I click on that t will spawn in a certain model located in ServerStorage and the GUI will disappear.
COMMUNITY QUESTION
Replicating A UD Westover Spawning GUI. Can Anyway Make That Script?
1 answer
Not played the game but by your description it seems pretty straight-forward.
For the image of a skyline create an ImageLabel and put it in a ScreenGui, then to make the image cover the entire screen, use the following;
BackgroundImage.Size(UDim2.new(1, 0, 1, 40))
BackgroundImage.Position(UDim2.new(0, 0, 1, -40))
For the buttons create a TextButtonand put in in a ScreenGui somewhere then insert a StringValue with the value as the corresponding name of the vehicle in ReplicatedStorage, then use the following code; (make sure to adapt it to your needs)
for i, v in pairs(ScreenGui:GetChildren()) do
if v:IsA("TextButton") then
v.MouseButton1Click:Connect(function()
ScreenGui.Enabled == false -- This 'closes' the GUI.
Vehicle = game.ReplicatedStorage:FindFirstChild(v.StringValue.Value):Clone() -- This finds the vehicle and clones it.
Vehicle.Parent = game.Workspace
end)
end
end
I made this off the top of my head so it may have some errors but if you know basic scripting then you should be able to sort them out.
I hope this helps.
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
I dont know if this is related it kinda didnt work. 17:39:50.403 - Players.FPSVision.PlayerGui.ScreenGui.Frame.ImageButton.Script:1: attempt to index global 'ScreenGui' (a nil value) 17:39:50.406 - Stack Begin 17:39:50.409 - Script 'Players.FPSVision.PlayerGui.ScreenGui.Frame.ImageButton.Script', Line 1 17:39:50.412 - Stack End 17:39:50.414 - Players.FPSVision.PlayerGui.ScreenGui.Frame.Script:1: a
^ You have to switch out "ScreenGui" for your gui...