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

How do I make a gui car spawner?

Asked by 8 years ago

I have the GUI and I have the position of the car, located in serverstorage. I'm not sure how to make the car spawn and be drivable, as looking at spawn buttons it looks very complicated. Please help.

0
You need to provide some sort of scripts so that we can work on it and refer to it. Inscendio 42 — 8y
0
I'd love to help but I need some reference to see what's going on here. Inscendio 42 — 8y

1 answer

Log in to vote
1
Answered by 8 years ago

Honestly, it is not complicated! Put a local script in your button, then we code he mousebutton1down event!

local button = script.Parent -- we get the button we want to click
local car = game.ServerStorage.Car -- we get the car


button.MouseButton1Down:connect(function() -- we check to see if the player has clicked the mouse

    car:Clone() -- clone the car
    car:Clone().Parent = workspace
    car:Clone().Position = Vector3.new(--whatever) -- if so, we clone the car, change the parent to workspace, and if needed, change the position!

end)

This should all work! Tested it on my laptop and worked great! Please upvote if worked!

0
if FE is turned on you will need to have some remote events fire so the whole server can see. DeveloperSolo 370 — 8y
0
Thank you, it worked well! Sorry I cant upvote, i don't have enough rep, but I thank you dearly! iiCoulroPhobia 10 — 8y
0
Thats fine! Script0rr 65 — 8y
0
How would we mod this script so that it also checks if the player's currency is enough to buy it. And how would you do it with FE remove events?? Im a beginner so assume I know nothing. Thanks!! Your help would be HUGELY appreciated. BADABOO2016 3 — 7y
0
idk how to do this I click on it and nothing happens FPSVision -14 — 6y
Ad

Answer this question