#So when I reset while in Rock form I don't actually reset
1 messages · Page 1 of 1 (latest)
So when I reset while in Rock form I don't actually reset
If anyone can help me i would be greatful 😄
Like
When u are in the rock
And click on reset button
It doesn't reset
The player
✅ How to fix it: Add cleanup on death or respawn
Add a listener to the player's character's Humanoid.Died or CharacterRemoving, like so:
✅ Insert this after setting up the rock form (near the first if not character:FindFirstChild("rock") then)
lua
Copy code
-- Cleanup on death or character removal
local function onCharacterCleanup()
if rockPart then rockPart:Destroy() end
if bgMusic and bgMusic:IsA("Sound") then
bgMusic:Play()
end
setMovement(humanoid, 6, 20)
if slapScript then
slapScript.Disabled = false
end
local inLobby = player:FindFirstChild("InLobby")
if inLobby then inLobby:Destroy() end
local cleanupValue = player:FindFirstChild("RockPlateCleanup")
if cleanupValue and cleanupValue.Value then
pcall(cleanupValue.Value)
end
if cleanupValue then
cleanupValue:Destroy()
end
if player:FindFirstChild("RockTween") then
player.RockTween:Destroy()
end
end
-- Listen to death or character cleanup
humanoid.Died:Connect(onCharacterCleanup)
character.AncestryChanged:Connect(function(_, parent)
if not parent then
onCharacterCleanup()
end
end)
🚫 1. HumanoidRootPart.Anchored = true
Freezes the player in place by anchoring their root part.
But if the character dies or tries to reset, Roblox may fail to properly ragdoll or respawn them since the HRP is still anchored.
🧱 2. Welds the rock to the player
lua
Copy code
local weld = Instance.new("WeldConstraint")
weld.Part0 = rockPart
weld.Part1 = hrp
The rock is physically welded to the HumanoidRootPart.
If the player dies, the weld can interfere with death physics, and depending on your respawn behavior, it may persist or prevent full destruction of the character model.
thats what chat gpt told me homie, useful resource.
Chatgpt sometimes is wrong
it dont hurt to try
I will try twrm cuz i gtg to sleep
made a full build script for making homes like meep city and data stores
chat gpt sucks for roblox scripting and sucks even more for beginners, it tends to confuse them cause they lack fundamental understanding.
agreed BUT its useful for some small error fixings
If you know how basically every insertable object works with a script and how to make variables interchangeable it can make anything
it is a tool, best suited for advanced users
If u told a beginner to make a find a blank game
They'd make a code with chat gpt for every single character
Instead of a master script that handles the data in replicated storage, string values for each items information and description etc etc
But if you want a quick setup for something basic like player touch block causes anotjer part to do soemthing
Chat gpt can do it relatively easier
Mb for spelling errors im cleaning and on mobile
me personally i don't use it but i have a friend tried making a system on it
bro was crashing out
You have to be very specific with what you want
If you tell it to make you something it'll make it assuming thats the sole thing. If you tell it to make a currency system nd a shop it'll make it so it only has one item that isnt easy to duplicate and requires lots of work rather than pulling it from somewhere and havibg a template unless u specify
Its downfall is it gives you exactly what you asked for and nothing else