#door not work pls help and solve

1 messages · Page 1 of 1 (latest)

thorn dust
#

ok so

frosty sleet
#

You uh, wanna put a description in there?

thorn dust
thorn dust
frosty sleet
thorn dust
#

so like

frosty sleet
thorn dust
#

is that god

#

good

frosty sleet
# thorn dust is that god

not really

Just describe the issue, what isn't happening, what should be happening, what you've tried, and if there are any warnings or errors.

Maybe mention where the script is and provide the code related to the door

thorn dust
#

ok

#

ill provide the code and desrive issues

#

local doorModel = script.Parent
local button = doorModel:FindFirstChild("Button")
local clickDetector = button:FindFirstChild("ClickDetector")

local door1 = doorModel:FindFirstChild("Door1")
local door2 = doorModel:FindFirstChild("Door2")

local stoneDoorSound = game.Workspace:FindFirstChild("Stone Door")
local beepSound = game.Workspace:FindFirstChild("Beep!") -- Sound with asset ID rbxassetid://138081500

local tweenInfo = TweenInfo.new(
    6, -- Duration set to 6 seconds
    Enum.EasingStyle.Linear, -- Easing style
    Enum.EasingDirection.Out, -- Easing direction
    0, -- Repeat count (0 = no repeat)
    false, -- Reverses (false = no reverse)
    0 -- Delay time
)

local buttonPressed = false -- Flag to track if the button has been pressed

local function animateDoors()
    if buttonPressed then return end -- Exit if the button has already been pressed
    buttonPressed = true -- Set the flag to true to prevent further presses

    if door1 and door2 and stoneDoorSound and beepSound then
        local goal1 = {Position = door1.Position + Vector3.new(0, 10, 0)}
        local goal2 = {Position = door2.Position + Vector3.new(0, 10, 0)}

        local tween1 = TweenService:Create(door1, tweenInfo, goal1)
        local tween2 = TweenService:Create(door2, tweenInfo, goal2)

        tween1:Play()
        tween2:Play()
        stoneDoorSound:Play() -- Play the stone door sound
        beepSound:Play() -- Play the beep sound
    end

    if button then
        button.Material = Enum.Material.Neon -- Set the button's material to neon
    end
end

if clickDetector then
    clickDetector.MouseClick:Connect(animateDoors)
end
#

thats the script

#

so the things that do work are the button which turns neon, but everything else doesnt work, for example the beep press and the door sound doesnt work, and ive tried somewhat editting this, this is just a script i used from a diferent thing i made and that one works perfectly fine, and i tried to recreate it with this and i eventually just pasted the other script inside and checked if it would work, i renamed everything the same way and it still doesnt work

#

i did rename everything ingame to match the script but it still doesnt work

frosty sleet
thorn dust
#

oh alr

frosty sleet
#

Print in the if statement to see if that's even running

thorn dust
#

this good?

#

print(balls)

frosty sleet
# thorn dust print(balls)

No need to brain rot. It isn't good because that's not a string. "Hello World" is a string because of the quotes around it

thorn dust
#

ohh

#

ok yeah the script works

frosty sleet
thorn dust
#

uhh let me check

#

can i paste the output?

#

its very confusing and i cant tell