#help me pls
103 messages · Page 1 of 1 (latest)
local DataStoreService = game:GetService("DataStoreService")
local characterDataStore = DataStoreService:GetDataStore("CharacterDataStore")
local inventoryDataStore = DataStoreService:GetDataStore("InventoryDataStore")
local function deleteCharacterData(player)
local userId = player.UserId
local success, errorMessage = pcall(function()
characterDataStore:RemoveAsync("character" .. userId)
inventoryDataStore:RemoveAsync("inventory" .. userId) -- Remove inventory data
end)
if success then
print("Character data and inventory for player " .. player.Name .. " have been deleted.")
-- Add a flag to prevent the character from coming back
characterDataStore:SetAsync("characterdeleted" .. userId, true)
else
warn("Failed to delete character data and inventory for player " .. player.Name .. ": " .. errorMessage)
end
end
-- Example usage: Call this function when a player decides to delete their character
game.Players.PlayerRemoving:Connect(deleteCharacterData)
so whats the problem tho
whats the problem tho
Lookin' for it right now-- I just reposted the code so I could read it
** You are now Level 9! **
ok thank you
After looking through the video and seeing that none of the debug messages printed, I don't think this section of the code ever got ran. Can you post your UnitStats script?
what do u mean by unitstats
im doing this for a friend but i have the game
if you can guide
me
Whatever script you have saved here:
@faint leaf whh one
I know nothing about this game 💀
But from the sounds of it, look somewhere in StarterGui?
Nope, not this one. Click on the error while the game is running and it'll take you to the file
It needs to have at least 11 lines
Nope-- judging from the error code it should be something inside of InvFrame
If you click here, it'll take you right to it:
which one in there?
Click inside of statFrame
** You are now Level 3! **
Let me see the full thing uncropped
this a whole lotta script
I bet
so how do i make the script like how u said
But just to make sure you're in the right place, let me see your explorer
if i post the script on discord
It's probably too long lol
Yep, that looks right

Bro please no
what
Right click the file > Save to file
Upload it here
there u go
do you have this setting enabled
how do i check
how do i check it
i played in studio
my friend shared it to me so i cant check the game in roblox or can i
@faint leaf
screwed up?
in line 11
show me an example
Changing script.Parent.MouseButton1Click:Connect(function(p) to script.Parent.MouseButton1Click:Connect(function()
Delete this message
ok
My mistake was that Right click -> save to file didn't save the script...
IT SAVED THE ENTIRE GAME
the character is still there):
it deletes
but when i rejoin
the character is there
Does the error go away?
@placid mural Is this what your script says word for word? Specifically lines 8 and 9. Seems like they might be missing underscores
show me which parts
** You are now Level 4! **
So I spent some time looking around the code, and I saw the errors I came across didn't really look like errors one could accidentally make. For instance, almost every script had a p in the function's parameters, and the missing underscores didn't seem like a silly mistake either
So I just want to ask-- did anything happen before coming here?
This seems more intentional than accidental