#No Errors: ClickDetectored curtain system won’t open
1 messages · Page 1 of 1 (latest)
Explorer Pic:
local TS = game:GetService("TweenService")
local TI = TweenInfo.new(2.5, Enum.EasingStyle.Quint, Enum.EasingDirection.InOut)
local open1 = TS:Create(script.Parent.Model.Main, TweenInfo.new(2.5, Enum.EasingStyle.Quint, Enum.EasingDirection.InOut), {Position = script.Parent.Open.Main.Position, Size = script.Parent.Open.Main.Size})
local close1 = TS:Create(script.Parent.Model.Main, TweenInfo.new(2.5, Enum.EasingStyle.Quint, Enum.EasingDirection.InOut), {Position = script.Parent.Close.Main.Position, Size = script.Parent.Close.Main.Size})
local open2 = TS:Create(script.Parent.Model.Main1, TweenInfo.new(2.5, Enum.EasingStyle.Quint, Enum.EasingDirection.InOut), {Position = script.Parent.Open.Main1.Position, Size = script.Parent.Open.Main1.Size})
local close2 = TS:Create(script.Parent.Model.Main1, TweenInfo.new(2.5, Enum.EasingStyle.Quint, Enum.EasingDirection.InOut), {Position = script.Parent.Close.Main1.Position, Size = script.Parent.Close.Main1.Size})
local size = script.Parent.Model.Main.Size
local debounce = false
if not script.Parent.OpenOnStart.Value then
close1:Play()
close2:Play()
end
script.Parent.Part.ClickDetector.MouseClick:Connect(function()
if not debounce then
debounce = true
if script.Parent.Main.Size == size then
close1:Play()
close2:Play()
wait(2)
debounce = false
else
open1:Play()
open2:Play()
wait(2)
debounce = false
end
end
end)
What's the error exactly?
Why did you create the tweeninfo variable and not use it?
I was going to use it then decided no too for some odd reason
I haven’t slept so 🤷🏻♂️
your script is super long for no reason its kinda confusing ngl
If you got a better idea on how to do it, hit me
But don’t spoonfeed if you find the issue.
Please explain the issue so I can learn yk
Use the tween infos, turn the variables like main1 and main into variables so you can just do Main1,Size
local TS = game:GetService("TweenService")
local TI = TweenInfo.new(2.5, Enum.EasingStyle.Quint, Enum.EasingDirection.InOut)
local Main,Main2 = script.Parent.Close.Main,script.Parent.Close.Main1
local open1 = TS:Create(Main,TI, {Position = Main.Position, Size = Main.Size}) -- and so on
Main 1 and Main 2 are 2 different things
if script.Parent.Main.Size change to if script.Parent.Model.Main.Size
also i found why your script isnt working, you're tweening the position and size to the same size and position it is already in
Unless im reading the variables wrong
ye ik
Still doesn't work and I've tried adding in your suggestions