#DOOR

49 messages · Page 1 of 1 (latest)

quick oak
#

my code is:
local TweenService = game:GetService("TweenService")

local Hinge = workspace.DOORTEST.Hinge
local prompt = script.Parent.Door.ProximityPrompt

local goalOpen = {}
goalOpen.CFrame = hinge.CFrame * CFrame.Angles(0, math.rad(90), 0)

local goalClose = {}
goalClose.CFrame = hinge.CFrame * CFrame.Angles(0, 0, 0)

local tweenInfo = TweenInfo.new(1)
local tweenOpen = TweenService:Create(hinge, tweenInfo, goalOpen)
local tweenClose = TweenService:Create(hinge, tweenInfo, goalClose)

prompt.Triggered:Connect(function()
if prompt.ActionText == "Close" then
tweenClose:Play()
prompt.ActionText = "Open"
else
tweenOpen:Play()
prompt.ActionText = "Close"
end
end)

But whenever i play game and press E, it does nothing.

lusty phoenix
#

Any errors on the output bar?

quick oak
#

Where do i check that

lusty phoenix
#

on view

#

View Tab

#

You'll see there's many icons on the right side of the explorer & properties tab

#

And then just find output

quick oak
#

thats it

lusty phoenix
#

Yeah? You found it?

#

Oh wait

quick oak
#

Found whatt

lusty phoenix
#

Are those all the errors?

quick oak
#

Oh wait

#

04:22:45.918 Liminal Horror @ 06 Jan 2024 04:22 auto-recovery file was created - Studio
04:22:51.398 Failed to load sound rbxassetid://2297712140: Unable to download sound data - Studio
04:22:51.399 ▶ Failed to load sound rbxassetid://1664205910: Unable to download sound data (x2) - Studio
04:22:51.485 Failed to load sound rbxassetid://7103093295: Unable to download sound data - Studio
04:22:51.485 ▶ Failed to load sound rbxassetid://201887209: Unable to download sound data (x3) - Studio
04:22:51.690 Hinge is not a valid member of Model "Workspace.DOORTEST" - Server - Script:3
04:22:51.691 Stack Begin - Studio
04:22:51.691 Script 'Workspace.DOORTEST.Script', Line 3 - Studio - Script:3
04:22:51.691 Stack End - Studio
04:22:55.018 Failed to load sound rbxassetid://201887209: Unable to download sound data - Studio
04:22:55.019 ▶ Failed to load sound rbxassetid://1664205910: Unable to download sound data (x2) - Studio
04:22:55.089 Failed to load sound rbxassetid://2297712140: Unable to download sound data - Studio
04:22:57.091 exception while signaling: Must be a LuaSourceContainer - Studio
04:22:58.549 ▶ Failed to load sound rbxassetid://201887209: Unable to download sound data (x2) - Studio
04:22:58.600 Failed to load sound rbxassetid://7103093295: Unable to download sound data - Studio
04:22:59.487 MeshContentProvider failed to process https://assetdelivery.roblox.com/v1/asset?id=4785764674 because 'could not fetch' - Studio
04:22:59.819 ▶ Failed to load sound rbxassetid://201887209: Unable to download sound data (x4) - Studio
04:23:24.271 Disconnect from ::ffff:127.0.0.1|54758 - Studio

lusty phoenix
#

You didn't have to send the unrelated errors but whatever, okay so there's an error on the Hinge

quick oak
#

How do i fix it

lusty phoenix
#

It says that it isn't a valid member of workspace.DOORTEST

quick oak
#

Also its my first day scripting, well first 30 minutes scripting so i dont know anything lol

quick oak
lusty phoenix
#

You can't transform a hinge into a part

lusty phoenix
#

I want you to show me the explorer

quick oak
#

Okay

#

uh

#

its really messy

lusty phoenix
#

Don't do Script.Parent.Hinge

#

Just get the hinge by doing

local Hinge = workspace.DOORTEST.Hinge
#

Like that

quick oak
#

0hhhhhh

hollow frostBOT
#

studio** You are now Level 2! **studio

quick oak
#

Ty ill see if it works now

#

Hinge is not a valid member of Model "Workspace.DOORTEST" - Server - Script:3

#

apparently

lusty phoenix
#

Huhh

#

Show me your script again

quick oak
#

local TweenService = game:GetService("TweenService")

local Hinge = workspace.DOORTEST.Hinge
local prompt = script.Parent.Door.ProximityPrompt

local goalOpen = {}
goalOpen.CFrame = hinge.CFrame * CFrame.Angles(0, math.rad(90), 0)

local goalClose = {}
goalClose.CFrame = hinge.CFrame * CFrame.Angles(0, 0, 0)

local tweenInfo = TweenInfo.new(1)
local tweenOpen = TweenService:Create(hinge, tweenInfo, goalOpen)
local tweenClose = TweenService:Create(hinge, tweenInfo, goalClose)

prompt.Triggered:Connect(function()
if prompt.ActionText == "Close" then
tweenClose:Play()
prompt.ActionText = "Open"
else
tweenOpen:Play()
prompt.ActionText = "Close"
end
end)

#

i changed it to that

#

Nah its fine i give up ill come back to it another day

#

scripting is so difficult

#

Thank you though

lusty phoenix
#

Just change the "hinge" from TweenService:Create to "Hinge"

#

@quick oak no worries, I suggest you look up a tutorial you could follow tho like Alvin blox or TheDevKing

lusty phoenix
#

Is the Door solved now or not

quick oak
#

Nah ive been away but i get back tonight in abt an hour

lusty phoenix
#

Alright

quick oak
#

Alright im back

#

time to FINALLY deal with this fckn door