-
What do you want to achieve? Keep it simple and clear!
I want to make a new data store for each individual car, if a player owns the vehicle the value inside the data store will be true, else it will be false. -
What is the issue? Include screenshots / videos if possible!
I can’t even create the datastore with the name of the vehicle ID, it just gives me this error:
[attempt to call a Instance value] I’ve tried tostring’ing the car id (which is a number based on its order in the car selection menu -
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I’ve asked elsewhere with no responses.
PurchaseCar.MouseButton1Click:Connect(function()
local car = ReplicatedStorage.ShowcaseCars:FindFirstChild(CurrId)
local CarDS = DataStore2(CurrId, Player)
local CurrStatus = CarDS:Get(false)
if CurrStatus then
print("Player owns car!")
else
CarDS:Set(true)
print("Players purchased car!")
end
end)