Рет қаралды 27
скрипт:
local part = script.Parent -- Reference to the part this script is attached to
-- Function to make the part fall
local function makePartFall()
part.Anchored = false -- Unanchor the part to allow it to fall
part.CanCollide = false -- Optional: Prevent the part from colliding with other objects as it falls
end
-- Connect the function to the Touched event of the part
part.Touched:Connect(function(hit)
local character = hit.Parent
local humanoid = character:FindFirstChildOfClass("Humanoid")
-- Check if the object that touched the part has a Humanoid, indicating it's a player
if humanoid then
makePartFall()
end
end)
#robloxstudio