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

Why is my car spawn GUI is making the car spawn anchored?

Asked by
Rxhan 0
9 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!

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 )

0
There is nothing to do with anchoring in this script so obviously it's a fault in your building. Ryzox 220 — 9y
0
Probably welded it to the floor NotSoNorm 777 — 9y
0
I have it in the air & I tried it on multiple cars - not sure why it still floats. Rxhan 0 — 9y

1 answer

Log in to vote
-1
Answered by 9 years ago

See if this works!

game.workspace.MODELNAMEHERE.Anchored = false
0
Anchored is not a valid member of model .-. Ryzox 220 — 9y
Ad

Answer this question