Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
-2

How to make a slide-able door by typing in the chat?

Asked by 10 years ago

By typing a command in the chat, the door would open. It's a slide-able door so... what things do I have to do? Such as making it slide-able and script to make.

0
Not a request site. qVoided 221 — 4y

5 answers

Log in to vote
1
Answered by
ultrabug 306 Moderation Voter
10 years ago

You can use the Chatted event to determine when the command is said, and then use a for loop to move the door over with CFrame. For example:

game.Players.PlayerAdded:connect(function(player)--finds the new player
    player.Chatted:connect(function(msg)--gets the message
        if msg=="Open"then
            for i=1,10 do--for loop
                door.CFrame=door.CFrame + Vector3.new(0, 0, 1)--Editing CFrame
                wait(0.1)
            end
        end
    end)
end)
0
So this would make the door some sort of like in the malls. Not like in the blink of an eye the door will just instantly open...? SilentProtagonist 6 — 10y
0
Just play around w/ it, it won't open instantly but the way I used it it will open very quickly, withen 1 second it will have moved 10 studs. Just mess around w/ the numbers to see what you can do. ultrabug 306 — 10y
0
Oh alright... Thanks! That's what I was going to do... get a script for someone and mess up with it until I break it. What I don't get in scripting is where they get such keywords... such as "PlayerAdded". To be honest, I don't know where to start scripting... I don't know what to make. SilentProtagonist 6 — 10y
0
For most things, I just go to the 'object browser' in edit mode, it helps alot. You can look at key objescts and find out events and properties that go w/ them. ultrabug 306 — 10y
View all comments (3 more)
0
"player.Chatted:connect(function(msg)--gets the message" About this... in the "msg", do I still have to type slash "/" or just the message itself? Also about the 'Object Browser'. So... was checking out some and when you click it. It shows more options that when you clicked them it has numbers 0-3 or maybe higher. Like this... "PartType 1: Block" What do I have to type exactly? SilentProtagonist 6 — 10y
0
I have no idea what you mean... ultrabug 306 — 10y
0
Alright nevermind... SilentProtagonist 6 — 10y
Ad
Log in to vote
0
Answered by
yurhomi10 192
10 years ago

you need to learn the chatted event and basic math to do this.

Log in to vote
0
Answered by 10 years ago

CFrame and chatted event.

Log in to vote
-1
Answered by 10 years ago

Thats a sliding door but if its a just a cancollide door it would be.

Game.Players.PlayerAdded:connect(function(player)
plater.Chatted:connect(function(msg)
if msg =="Open" then
for i= 1,10 do
door.transparency = "0.5"
door.cancollide = "true"
Wait(3)
end
Log in to vote
-1
Answered by 10 years ago

So I got -1 on my question? Troll or something? That ain't funny... Putting negative vote w/o a reason? Why not make some improvements... That would prevent such troll things away.

Answer this question