I know there is a video on YT for it. But that’s not what I want. I want it so if I said like “Burger” it would open sideways. Like automatic door. I am just a beginner on scripting. Can anyone help me do this?
2 Likes
Player.Chatted:Connect(function(message)
Yes, that is possible with checking what a player chatted with the Player.Chatted function:
The else, I believe you probably know how to make the door open and stuff.
this should work:
local TweenService = game:GetService("TweenService")
local door = --change this to the door
game.Players.PlayerAdded:Connect(function(player)
player.Chatted:Connect(function(msg)
if msg:lower() == "burger" then
local goal = {}
goal.Position = door.Position + Vector3.new(0,5,0)
local Info = TweenInfo.new(1)
local tween = TweenService:Create(door, Info, goal)
tween:Play()
end
end)
end)
1 Like
Ok, I will test it. Which way will the door open?
Do I change “door” to the door name or = to game.Workspace.Door–But the part
To = workspace.Door
thats what you need to do
1 Like
I made it so it opens upwards sorry, but you can change the position easily.
1 Like
It just falls back down. How do I make it so it doesn’t fall down and it comes back down after like 15 seconds?
Is it anchored or not. Make sure that it’s anchored. Unless you moving a welded door, then don’t.
1 Like
Oh, whoops. Ok I will do that.