Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Replicating A UD Westover Spawning GUI. Can Anyway Make That Script? [closed]

Asked by
FPSVision -14
6 years ago

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.

Closed as Not Constructive by H4X0MSYT, Vulkarin, DevNetx, and BlueTaslem

This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.

Why was this question closed?

1 answer

Log in to vote
0
Answered by 6 years ago

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.

0
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 FPSVision -14 — 6y
0
^ You have to switch out "ScreenGui" for your gui... TheeDeathCaster 2368 — 6y
Ad