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

Why does my Car Spawn GUI make it anchored?

Asked by
Rxhan 0
8 years ago

I have a script that takes cars from lighting and places into workspace right next to you, but the car becomes anchored once it has moved it workspace.

PLEASE help!

IN ADDITION:

Here's the script

local model = game.Lighting.Car local character = game.Players.LocalPlayer.Character local Currency = game.Players.LocalPlayer.leaderstats.Money local Price = 2000 local spawn = script.Parent:WaitForChild("SpawnButton")

function onClicked() if Currency.Value >= Price then Currency.Value = Currency.Value - Price local a = model:clone() a.Parent = game.Workspace wait() a:MakeJoints() wait() a:MoveTo(character.Torso.Position + Vector3.new(0,0,10)) game:GetService("Debris"):AddItem(script.Parent, 0) end end spawn.MouseButton1Click:connect(onClicked)

This is to spawn the car ( Yes it's a GUI, I also have a separate script so when a brick is touched, the spawn GUI pops up - if you want that just ask )

Answer this question