How to Make a CAR SPAWNER🛠️ Roblox Studio Tutorial (2024!)

  Рет қаралды 2,155

NvcJakey

NvcJakey

3 ай бұрын

In todays video I show you how to make a GUI once clicked spawn you a car I Hope you enjoyed the video, Have a lovely rest of your day!
If you are a bit confused what to do, Feel free to message me on Discord or in the comments and Ill help you out!
Script 1
local rs = game:GetService("ReplicatedStorage")
local REs = rs.REs
local spawnEvent = REs.Spawn
script.Parent.MouseButton1Click:Connect(function(plr)
spawnEvent:FireServer(plr)
workspace.Car:Destroy()
end)
Script 2
game.Players.PlayerAdded:Connect(function(playerA)
local rs = game:GetService("ReplicatedStorage")
local REs = rs.REs
local spawnEvent = REs.Spawn
local SpawnParts = rs.SpawnParts
local Car = SpawnParts.Car
spawnEvent.OnServerEvent:Connect(function(plr)
local NewCar = Car:Clone()
local Player = game.Workspace:FindFirstChild(plr.Name)
NewCar.Parent = workspace
NewCar:MoveTo(Player.HumanoidRootPart.Position)
end)
end)
#coding #gaming #developer #scripting #lua #roblox #code #work #robloxstudio #robloxdeveloper #robloxdevelopment #development #luascript #games #game #create #sandbox #tutorial #tutorials #tutorialvideo #helping #learning #learn #learntocode2024 #learncoding #learncodingforbeginners

Пікірлер: 33
@NvcJakey
@NvcJakey 2 ай бұрын
Here is a new video that shows how to make the car purchasable and multiple cars can be spawned. (and data saving) kzfaq.info/get/bejne/jtdoZrGrp9SylXU.html Thanks @Ripperonni for the suggestion
@TheLonelyEditor
@TheLonelyEditor 26 күн бұрын
thx for adding the scripts to copy and paste in the comments
@Dawid_The_Man
@Dawid_The_Man 5 күн бұрын
thank you! your video only helped me. The other videos didnt do anything. Thanks Very much! A new subscriber. Just one problem. When theres 2 people in the server, it spawns 2 cars at once, any fix?
@Ripperonni
@Ripperonni 2 ай бұрын
PLEASE make a new video with explanation how to create menu with many cars and when you spawn a new car old despawnes pls make it i will be very happy if u make it i need it for game
@NvcJakey
@NvcJakey 2 ай бұрын
Alright, Ill work on it.
@NvcJakey
@NvcJakey 2 ай бұрын
Thanks for the suggestion, video uploaded kzfaq.info/get/bejne/jtdoZrGrp9SylXU.html
@Ripperonni
@Ripperonni 2 ай бұрын
@@NvcJakey THANK YOU VERY MUCH BRO♥️
@user-lc3ok9vg4g
@user-lc3ok9vg4g 28 күн бұрын
this is the erros that im getting its not working LocalScript:7: Car is not a valid member of Workspace "Workspace"
@NvcJakey
@NvcJakey 2 ай бұрын
To those wondering how to make a despawn button do this Replace the remote events script in serverscriptservice to this game.Players.PlayerAdded:Connect(function(playerA) local rs = game:GetService("ReplicatedStorage") local REs = rs.REs local spawnEvent = REs.Spawn local SpawnParts = rs.SpawnParts local Car = SpawnParts.Car spawnEvent.OnServerEvent:Connect(function(plr) local NewCar = Car:Clone() NewCar.Name = plr.name.."_Car" local Player = game.Workspace:FindFirstChild(plr.Name) NewCar.Parent = workspace NewCar:MoveTo(Player.HumanoidRootPart.Position) end) end) And change the original local script that spawns the car to this local rs = game:GetService("ReplicatedStorage") local REs = rs.REs local spawnEvent = REs.Spawn script.Parent.MouseButton1Click:Connect(function(plr) spawnEvent:FireServer(plr) -- Delete this part for the despawn script workspace:FindFirstChild(plr.name.."_Car"):Destroy() end) Duplicate the spawn button and name it to whatever you want, go to the local script in it and delete the line with the note Let me know if this works as im not sure since I havent tested it but if it doesnt Ill be sure to take a further look
@user-ut6zk7jk9l
@user-ut6zk7jk9l 13 күн бұрын
it isnt working for me
@user-lc3ok9vg4g
@user-lc3ok9vg4g 24 күн бұрын
it completly breaks with more than one person when there is 2 people in the server the spawn spawns 2 cars and same with 3 with three it sapwns 3 cars i tryed to edit the script by replacing the player section of it but doesnt work
@NvcJakey
@NvcJakey 24 күн бұрын
Thank you so much for letting me know, I will look into it.
@user-lc3ok9vg4g
@user-lc3ok9vg4g 23 күн бұрын
Thanks mate!
@user-lc3ok9vg4g
@user-lc3ok9vg4g 28 күн бұрын
Oh never mind i fixed it
@_Maston
@_Maston 2 ай бұрын
Hi, do know by any chance how to add a button that despawns the car and also a popup info that tells you that you cant spawn more than 1 car? Thanks.
@NvcJakey
@NvcJakey 2 ай бұрын
I'm glad to know that you find interest in my videos, To create a despawn button, I believe you can just duplicate the spawn button and make some minor changes Duplicate the Spawn Button Gui Name it "DespawnButton" or whatever you want, go to the "Local Script" and go to line 6, delete it and your all set. I have not tested this so It may not work, let me know and I can do further testing if necessary. Currently that would only work in a singleplayer world. To make it multiplayer do the following: Replace the remote events script in serverscriptservice to this game.Players.PlayerAdded:Connect(function(playerA) local rs = game:GetService("ReplicatedStorage") local REs = rs.REs local spawnEvent = REs.Spawn local SpawnParts = rs.SpawnParts local Car = SpawnParts.Car spawnEvent.OnServerEvent:Connect(function(plr) local NewCar = Car:Clone() NewCar.Name = plr.name.."_Car" local Player = game.Workspace:FindFirstChild(plr.Name) NewCar.Parent = workspace NewCar:MoveTo(Player.HumanoidRootPart.Position) end) end) And change the original local script that spawns the car to this local rs = game:GetService("ReplicatedStorage") local REs = rs.REs local spawnEvent = REs.Spawn script.Parent.MouseButton1Click:Connect(function(plr) spawnEvent:FireServer(plr) -- Delete this part for the despawn script workspace:FindFirstChild(plr.name.."_Car"):Destroy() end) And delete the line with the note for the new one that desawns the car This is all basially the same thing but with minor changes. Let me know if it works
@_Maston
@_Maston 2 ай бұрын
@@NvcJakey Thanks a lot!
@daubIskewl
@daubIskewl Ай бұрын
it doesn't wort with more than 1 person
@SharkWithProngles
@SharkWithProngles Ай бұрын
if i make 2 cars and use the same script, do they counteract each other?
@NvcJakey
@NvcJakey Ай бұрын
Use this video for multiple cars kzfaq.info/get/bejne/jtdoZrGrp9SylXU.html
@skylermiller-kk1zk
@skylermiller-kk1zk 17 күн бұрын
for me it worked just when i press the button nothing happens im not sure how to fix yet.
@skylermiller-kk1zk
@skylermiller-kk1zk 17 күн бұрын
i think it might be a wrong name i put or mispelled somehow
@skylermiller-kk1zk
@skylermiller-kk1zk 17 күн бұрын
ok it was the spawn because it was not capitalised on the s
@ALACRAlatam
@ALACRAlatam 10 күн бұрын
no funciona y he revisado todo como por 30 minutos no hay forma de spawnear un carro que no sea el que tu escogiste
@aurimasstrunkevicius4379
@aurimasstrunkevicius4379 3 ай бұрын
how to add more cars?
@NvcJakey
@NvcJakey 3 ай бұрын
What do you mean, explain in further detail
@MCDONALDS._.
@MCDONALDS._. 2 ай бұрын
@@NvcJakey he means like a real gui where you press a spawn button and multible cars show that you can spawn and also can you make it beacause i been looking a month and i had no luck
@NvcJakey
@NvcJakey 2 ай бұрын
Add more cars to spawn parts and edit the scripts to spawn both vehicles
@TheLonelyEditor
@TheLonelyEditor 26 күн бұрын
it didnt work
@NvcJakey
@NvcJakey 24 күн бұрын
What doesn't work?
@BanditCat-jt8im
@BanditCat-jt8im Ай бұрын
thanks for wasting my time buddy i literally did everything step by step nothing works thx
@NvcJakey
@NvcJakey Ай бұрын
Listen, this works, I even asked one of my friends to do it without any help and they did and it worked. You obviously had an error in the script that you can't seem to find. I am willing to help you with that if you just ask, please don't go around saying stuff works when its your own error.
@BanditCat-jt8im
@BanditCat-jt8im Ай бұрын
@@NvcJakey then join my studio and help me pls i need to make a car spawner basically u get a starter car and then u ride it and get money by riding it, then with that money u can unlock other cars help me make that users ZoYRulez il invite u
How to MAKE a DEATH SCREEN in Roblox Studio!
30:13
Rustysillyband
Рет қаралды 4,4 М.
WHAT’S THAT?
00:27
Natan por Aí
Рет қаралды 13 МЛН
ОСКАР vs БАДАБУМЧИК БОЙ!  УВЕЗЛИ на СКОРОЙ!
13:45
Бадабумчик
Рет қаралды 6 МЛН
Дарю Самокат Скейтеру !
00:42
Vlad Samokatchik
Рет қаралды 8 МЛН
I tried Discord Bot Makers...
14:19
FaceDev
Рет қаралды 106 М.
I Made A Car Game In 24 Hours
8:24
Fexalan
Рет қаралды 206 М.
Essential UI Tips & Tricks | Roblox Studio
9:19
Stewiepfing
Рет қаралды 24 М.
The Only Thing You Need To Learn How To Script
4:36
Ludius
Рет қаралды 159 М.
Programming Rarity is Harder Than You Think
12:31
ByteBlox
Рет қаралды 202 М.
This Is Why 99% Of Roblox Games FAIL
3:25
Bubblx
Рет қаралды 162 М.
How to Make a Car With Suspension: Roblox Studio
17:20
BlockyScript
Рет қаралды 23 М.