Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Help for car spawning GUI (Server Storage not a valid member of DataModel?)

Hello, i am trying to make a car spawner for my 3 cars. I am following a tutorial. Here's my code.

game.Players.PlayerAdded:Connect(function(plr)

local leaderstats = Instance.new("Folder")

leaderstats.Name = "leaderstats"

leaderstats.Parent = plr

  

local ignorethisplease = Instance.new("IntValue")

ignorethisplease.Name = "IgnoreThisPlease"

ignorethisplease.Value = 0

ignorethisplease.Parent = leaderstats

end)

  

  

  

game.ReplicatedStorage:WaitForChild("CheckPrice").OnServerInvoke = function(player,NameOfCar)

return game.ServerStorage.Cars:FindFirstChild(NameOfCar).Price.Value

end

  

game.ReplicatedStorage:WaitForChild("SpawnCar").OnServerEvent:Connect(function(player,NameOfCar)

local car = game.SeverStorage.Cars:FindFirstChild(NameOfCar):Clone()

car:SetPrimaryPartCFrame(player.Character.HumanoidRootPart.CFrame + Vector3.new(0,0,15))

car.Parent = workspace

car:MakeJoints()

car.Name = player.Name.. "'s"..NameOfCar

end)

And it won't even work. I used a tutorial and it told me to run a command. I did game.ReplicatedStorage.SpawnCar:FireServer("imprezahatchback") but it still gives me an error.

Note: imprezahatchback is the name of my car.

1 answer

✓ Accepted answer

you spelled ServerStorage wrong, lol. you wrote "SeverStorage"

1 comment

0

Thank you, and now it works.

This discussion is preserved as it was. New answers, comments, and votes are closed.