I'm trying to make a window that will slide down with the command ";CloseWindow" and open with the command ";OpenWindow"
Can someone help??
https://cdn.discordapp.com/attachments/692111214775631872/833527617868005396/unkno wn.png
local GroupId = 5708827
local MinimumRank = 60
Local Window = game.Workspace.Window
game.Players.PlayerAdded:Connect(function(Player)
Player.Chatted:Connect(function(Message)
if.Player:GetRankInGroup(GroupId)>= MinimumRank then
if Message == ";CloseWindow" then
--CloseWindow
local TweenService = game:GetService("TweenService")
local blind1 = script.Parent.WaitForChild("Blind1")
local blind2 = script.Parent.WaitForChild("Blind2")
local blind3 = script.Parent.WaitForChild("Blind3")
local tweeningInformation = TweenInfo.new(
0.5,
Enum.EasingStyle.Linear,
Enum.EasingDirection.Out,
0,
false,
0
)
local blind1Close = {CFrame = CFrame.new(7.863, 6.905, 0.137)}
local blind2Close = {CFrame = CFrame.new(7.849, 6.991, 5.637)}
local blind3Close = {CFrame = CFrame.new(7.827, 6.887, 11.1377)}
local tween1Close = TweenService:Create(blind1,tweeningInformation, blind1Close)
local tween2Close = TweenService:Create(blind2,tweeningInformation, blind2Close)
local tween3Close = TweenService:Create(blind3,tweeningInformation, blind3Close)
elseif Message == ";OpenWindow" then
--OpenWindow
local TweenService = game:GetService("TweenService")
local blind1 = script.Parent.WaitForChild("Blind1")
local blind2 = script.Parent.WaitForChild("Blind2")
local blind3 = script.Parent.WaitForChild("Blind3")
local tweeningInformation = TweenInfo.new(
0.5,
Enum.EasingStyle.Linear,
Enum.EasingDirection.Out,
0,
false,
0
)
local blind1Open = {CFrame = CFrame.new(7.863, 20.186, 0.137)}
local blind2Open = {CFrame = CFrame.new(7.885, 20.271, 5.637)}
local blind3Open = {CFrame = CFrame.new(7.848, 20.168, 11.137)}
local tween1Open = TweenService:Create(blind1,tweeningInformation, blind1Open)
local tween2Open = TweenService:Create(blind2,tweeningInformation, blind2Open)
local tween3Open = TweenService:Create(blind3,tweeningInformation, blind3Open)
end
end
end)
end)

1 comment
I changed that, It didn't work