local leaderstats = Instance.new("Folder")
leaderstats.Name = "leaderstats"
leaderstats.Parent = player
local stage = Instance.new("IntValue")
stage.Name = "Stage"
stage.Value = 1
stage.Parent = leaderstats
player.CharacterAdded:Connect(function(char)
local hum = char:WaitForChild("Humanoid")
wait()
char:MoveTo(checkpoints[stage.Value].Postition)
hum.Touched:Connect(function(hit)
if hit.Parent == checkpoints then
if tonumber(hit.Name) == stage.Value + 1 then
stage.Value = stage.Value + 1
end
end
end)
end)
end)```
#i need some help
52 messages · Page 1 of 1 (latest)
so u need a DataStore system for that to save
Why are you doing humanoid.touched. I would’ve used checkpoint.touched
Or use the feet
rn im creating a DataStore to save the system then fixing the system to handle the position if player died it returns back to the location when the player died and adding other things
ty
** You are now Level 3! **
oh forgot about u lol
but im now creating the instance where if u entered the Stage
thank youu
so far this is what i created but the not fun part is creating so when the player dies it puts them back to the older spot
na delete urs and replace it with the one i created
i did but it dosen't work
what does the output say on
did u turn on API
first this
then look for Settings
then look for Security
then hit the one that i have lit up
so what does that mean for me its working
i see why now forgot this
the , after a table
lol
** You are now Level 10! **
at least i empliyed that system if not loaded data then it kicks the player
wait so what do i have to change at the script
for it to work
cause
i assume i have to put the part names somewhere
in the script
na all u need to do is just mess around in the location of adding a string
to the location aka IntValue or Folders if u want more folders
local Handler = {
['folders'] = {
{key = 'leaderstats',location = player},
{key = 'Pos',location = player}
},
['IntValue'] = {
{key = 'Stage',Value = 0},
},
['String'] = {
{key = 'Stage1',Value = ''},
{key = 'Stage2',Value = ''},
}
}```
only this part
and this partlua if Saving then local ls = player:FindFirstChild('leaderstats') local Pos = player:FindFirstChild('Pos') for i,v in pairs(Handler.IntValue) do local int = Instance.new('IntValue',ls) int.Name = v.key int.Value = Saving[int.Name] or v.Value end for i,v in pairs(Handler.String) do local pos = Instance.new('StringValue',Pos) pos.Name = v.Name pos.Value = Saving[pos.Name] or v.Value end else player:Kick('Your Stage Did not save please rejoin') end
just to add like NumberValue to put into a newfolder or smth
u know what how bout i just give u a datastore that explains it all
something that my friend and me created
are u trying it out
yeah but it dosen't really work