so im trying to make it so you click on a wall and it pops up a Gui saying would you like to buy this and you click yes, that part i know how to make but i dont know how to make it so when you click yes it saves for next time, im trying to make it so its kinda like pet simulator were you have to buy it and it saves that you can go through that wall.
thanks
local DataStoreService = game:GetService("DataStoreService")
local PartData = DataStoreService:GetDataStore("PartData")
--when player clicks yes:
PartData:SetAsync(player.UserId, true) -- true/false = condition of can collide
You can then load the DataStore whenever you want with GetAsync() for the player to determine if the part is cancollide or not
so like do i put that in a local script or a normal script and were do i put it?
BTW thanks
That’ll have to be a server script, but things like setting a part to cancollide = true/false for individual players will have to be handled with a local script.