So someone helped me with this door but It does not save on rejoin and it does not take away the Cash or (Sips) Can you help me make it save and MOSTLY Take away cash?
local _M = require(script.Parent.Settings)
script.Parent.Touched:Connect(function(hit)
local plr = game.Players:GetPlayerFromCharacter(hit.Parent)
if plr then
local rebirths = plr.leaderstats.Sips
if rebirths.Value >= _M.RequiredSips then
script.Parent.CanCollide = false
wait(.5)
script.Parent.CanCollide = true
end
end
end)
2nd script if you need it
local module = {
areaName = "Lava",
RequiredSips = 20000
}
return module

10 comments
See DataStores
I am new I need help like a script.
this is not a request site, if you don't know how to script we will point you in the right direction, but we will not make it for you
Dude stop telling me that Im not requesting anything I put the script I TRIED and if it does not work I put it here and people normally help teach me how to fix it not send me to Roblox page I already read that I just need help!
If you went to the link Thetacah pointed out, it tells you exactly how to save data, which is what you were asking, your script does not use any data stores, so therefor it doesn't save any data for the player
Can you please at least add a part where it takes away money? I dont know how to do that.
plr.leaderstats.Sips.Value = plr.leaderstats.Sips.Value - 20000
Thank u but where do I put it in the group?
you would put it after you check to see if you have the required sips, then before the door opens take away the sips
ok thak U