КАК СДЕЛАТЬ ОТКРЫТИЕ ДВЕРИ ЗА СЛОВА | Roblox Studio | Гайд #16
🚗Модель: Модели не будет, лентяи. 📜Скрипт: -- script made by Zuzia :3 local TweenService = game:GetService("TweenService") local door = game.Workspace:WaitForChild("Door") local Players = game:GetService("Players") local initialPosition = door.Position local liftHeight = 10 -- Высота подьема local animationSpeed = 0.3 -- Скорость подьема local openWords = {"Огурец","Мочалка","Табурет"} -- Сюда слова для открытия двери local closeWords = {"Тувек","Эээ","Стул"} -- Сюда для закрытия Players.PlayerAdded:Connect(function(player) player.Chatted:Connect(function(message) for _, word in openWords do if string.find(message:lower(), word) then wait(1) local doorTween = TweenService:Create(door, TweenInfo.new(1/animationSpeed), {Position = initialPosition + Vector3.new(0, liftHeight, 0)}) doorTween:Play() end end for _, word in closeWords do if string.find(message:lower(), word) then wait(1) local doorTween = TweenService:Create(door, TweenInfo.new(1/animationSpeed), {Position = initialPosition}) doorTween:Play() end end end) end)
🚗Модель: Модели не будет, лентяи. 📜Скрипт: -- script made by Zuzia :3 local TweenService = game:GetService("TweenService") local door = game.Workspace:WaitForChild("Door") local Players = game:GetService("Players") local initialPosition = door.Position local liftHeight = 10 -- Высота подьема local animationSpeed = 0.3 -- Скорость подьема local openWords = {"Огурец","Мочалка","Табурет"} -- Сюда слова для открытия двери local closeWords = {"Тувек","Эээ","Стул"} -- Сюда для закрытия Players.PlayerAdded:Connect(function(player) player.Chatted:Connect(function(message) for _, word in openWords do if string.find(message:lower(), word) then wait(1) local doorTween = TweenService:Create(door, TweenInfo.new(1/animationSpeed), {Position = initialPosition + Vector3.new(0, liftHeight, 0)}) doorTween:Play() end end for _, word in closeWords do if string.find(message:lower(), word) then wait(1) local doorTween = TweenService:Create(door, TweenInfo.new(1/animationSpeed), {Position = initialPosition}) doorTween:Play() end end end) end)