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.
How to make a slide-able door by typing in the chat?
5 answers
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)
7 comments
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...?
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.
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.
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.
"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?
I have no idea what you mean...
Alright nevermind...
you need to learn the chatted event and basic math to do this.
CFrame and chatted event.
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
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.
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
Not a request site.