You can write your topic however you want, but you need to answer these questions:
-
What do you want to achieve? Keep it simple and clear!
Tweening a locker door -
What is the issue? Include screenshots / videos if possible!
The door won’t tween -
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
None, none are similar enough.
After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
--i am currently testing it so expect it to be confusing
local Prox = script.Parent.Attachment.ProximityPrompt
local IsTaken = script.Parent["IsTaken?"]
local delay = false
local OpenTween = game:GetService("TweenService"):Create(script.Parent.Parent.Parent.Door, TweenInfo.new(0.25, Enum.EasingStyle.Back, Enum.EasingDirection.In, 0, false, 0), {["WorldPivot"] = script.Parent.Parent.Parent.DoorOpen.CFrame})
---
Prox.Triggered:Connect(function(Plr)
OpenTween:Play()
local Hum = Plr.Character:FindFirstChildOfClass("Humanoid")
if Hum and IsTaken.Value == false and delay == false and not Hum:HasTag("Died") then
delay = true
IsTaken.Value = true
Hum:AddTag("Hidden")
Plr.Character.HumanoidRootPart.Anchored = true
Plr.Character:PivotTo(script.Parent.CFrame)
wait(0.2)
delay = false
Prox.Triggered:Connect(function(Plr2)
if Plr2 == Plr and delay == false and IsTaken.Value == true then
delay = true
IsTaken.Value = false
Plr.Character.HumanoidRootPart.Anchored = false
Hum:RemoveTag("Hidden")
Plr.Character:PivotTo(script.Parent.Attachment.WorldCFrame)
wait(0.2)
delay = false
end
end)
end
end)