- What do you want to achieve? Keep it simple and clear!
I want the platform to disappear once the “Toucher” is touched.
- What is the issue? Include screenshots / videos if possible!
Whenever the platform model is called “HopPink1” only the collissions work properly, transparency breaks. However, once I rename it to “HopPink”, it starts to work. I sadly need it to be called HopPink1 because of another script
- What solutions have you tried so far?
Like everything, towards the end I just let ChatGPT try anything he wrote, I am desperate.
Note: There’s also a LocalScript for the Button that you can see on the videos which makes selected paltforms disappear, maybe it could SOMEHOW be a problem?
Chat3 Script
local MainBlock = script.Parent.Parent.MainBlock
local Toucher = script.Parent
local OuterSide = script.Parent.Parent.OuterSide
local GlassBreak = script.Parent.Parent.GlassBreak
local Debounce = false -- Moved debounce outside of the Touched event for global control
-- Function to make the player ragdoll instantly
local function ragdollPlayer(character)
-- Check if the character has a humanoid
if character and character:FindFirstChild("Humanoid") then
local humanoid = character:FindFirstChild("Humanoid")
-- Disable the humanoid's controls to simulate ragdoll (without forcefield)
humanoid.PlatformStand = true
humanoid.JumpHeight = 0 -- Disable jumping completely
-- Break the joints to allow ragdoll effect (Motor6D parts)
for _, part in pairs(character:GetChildren()) do
if part:IsA("Motor6D") then
part:Destroy() -- Break the joint to simulate ragdolling
end
end
end
end
Toucher.Touched:Connect(function(otherPart)
local Player = game.Players:GetPlayerFromCharacter(otherPart.Parent)
if Player and not Debounce then
Debounce = true -- Prevent multiple triggers
-- Trigger ragdoll effect on the player who touched the platform
ragdollPlayer(otherPart.Parent)
-- Hide the platform (make it invisible)
OuterSide.Part.Transparency = 1
OuterSide.Part2.Transparency = 1
OuterSide.Part3.Transparency = 1
OuterSide.Part4.Transparency = 1
MainBlock.Transparency = 1
-- Disable collision for the platform
OuterSide.Part.CanCollide = false
OuterSide.Part2.CanCollide = false
OuterSide.Part3.CanCollide = false
OuterSide.Part4.CanCollide = false
MainBlock.CanCollide = false
-- Play glass breaking sound
GlassBreak:Play()
-- Wait for 2 seconds before restoring the platform
wait(2)
-- Make the platform visible again
OuterSide.Part.Transparency = 0.6
OuterSide.Part2.Transparency = 0.6
OuterSide.Part3.Transparency = 0.6
OuterSide.Part4.Transparency = 0.6
MainBlock.Transparency = 0.6
-- Re-enable collision for the platform
OuterSide.Part.CanCollide = true
OuterSide.Part2.CanCollide = true
OuterSide.Part3.CanCollide = true
OuterSide.Part4.CanCollide = true
MainBlock.CanCollide = true
-- Re-enable player control after ragdolling
if otherPart.Parent:FindFirstChild("Humanoid") then
local humanoid = otherPart.Parent:FindFirstChild("Humanoid")
humanoid.PlatformStand = false -- Re-enable control
humanoid.JumpHeight = 50 -- Restore default jump height
end
-- Reset debounce after a short delay
wait(1) -- Adjust this if necessary
Debounce = false
end
end)
When called “HopPink1” - This shouldn’t happen
When called “HopPink” - This should happen