plr = game.Players.LocalPlayer -- plr, char, torso, and head are for later use. char = plr.Character torso = char.Torso head = char.Head ele1 = script.Parent.Part ele2 = script.Parent.Part2 touchbrick = script.Parent.tb function t(hit) if plr.Name == "Player" then ele2.Position = Vector3.new(587.972, 135.53, -18.316) wait() ele2.Position = Vector3.new(588.972, 135.53, -18.316) wait() ele2.Position = Vector3.new(589.972, 135.53, -18.316) wait() ele2.Position = Vector3.new(591.172, 135.53, -18.316) wait() ele2.Position = Vector3.new(592.572, 135.53, -18.316) wait() ele2.Position = Vector3.new(593.372, 135.53, -18.316) wait() ele2.Position = Vector3.new(594.372, 135.53, -18.316) wait() ele2.Position = Vector3.new(594.972, 135.53, -18.316) wait() ele2.Position = Vector3.new(595.773, 135.53, -18.316) wait() ele2.Position = Vector3.new(594.572, 135.53, -18.316) wait() ele2.Position = Vector3.new(593.572, 135.53, -18.316) wait() ele2.Position = Vector3.new(592.772, 135.53, -18.316) wait() ele2.Position = Vector3.new(591.972, 135.53, -18.316) wait() ele2.Position = Vector3.new(590.772, 135.53, -18.316) wait() ele2.Position = Vector3.new(589.972, 135.53, -18.316) wait() ele2.Position = Vector3.new(589.172, 135.53, -18.316) wait() ele2.Position = Vector3.new(588.772, 135.53, -18.316) wait() ele2.Position = Vector3.new(588.172, 135.53, -18.316) wait() ele2.Position = Vector3.new(587.572, 135.53, -18.316) wait() ele2.Position = Vector3.new(587.372, 135.53, -18.316) wait() ele1.Position = Vector3.new(575.572, 135.53, -18.316) wait() ele1.Position = Vector3.new(574.972, 135.53, -18.316) wait() ele1.Position = Vector3.new(573.772, 135.53, -18.316) wait() ele1.Position = Vector3.new(572.572, 135.53, -18.316) wait() ele1.Position = Vector3.new(570.771, 135.53, -18.316) wait() ele1.Position = Vector3.new(569.371, 135.53, -18.316) wait() ele1.Position = Vector3.new(567.971, 135.53, -18.316) wait() ele1.Position = Vector3.new(567.571, 135.53, -18.316) wait(3) ele1.Position = Vector3.new(569.171, 135.53, -18.316) wait() ele1.Position = Vector3.new(570.571, 135.53, -18.316) wait() ele1.Position = Vector3.new(571.971, 135.53, -18.316) wait() ele1.Position = Vector3.new(573.372, 135.53, -18.316) wait() ele1.Position = Vector3.new(574.372, 135.53, -18.316) wait() ele1.Position = Vector3.new(575.172, 135.53, -18.316) wait() ele1.Position = Vector3.new(575.772, 135.53, -18.316) wait() ele1.Position = Vector3.new(576.772, 135.53, -18.316) end end touchbrick.Touched:connect(t)
This script was made so it opens doors, The problem is though that when i run it in studio it dosen't work. There are also no error's in the output. Why is that?
Try this...
local ele1 = script.Parent.Part local ele2 = script.Parent.Part2 local touchbrick = script.Parent.tb function t(hit) local parent = hit.Parent if game.Players:GetPlayerFromCharacter(parent) then if parent.Name == "Player" then ele2.Position = Vector3.new(587.972, 135.53, -18.316) wait() ele2.Position = Vector3.new(588.972, 135.53, -18.316) wait() ele2.Position = Vector3.new(589.972, 135.53, -18.316) wait() ele2.Position = Vector3.new(591.172, 135.53, -18.316) wait() ele2.Position = Vector3.new(592.572, 135.53, -18.316) wait() ele2.Position = Vector3.new(593.372, 135.53, -18.316) wait() ele2.Position = Vector3.new(594.372, 135.53, -18.316) wait() ele2.Position = Vector3.new(594.972, 135.53, -18.316) wait() ele2.Position = Vector3.new(595.773, 135.53, -18.316) wait() ele2.Position = Vector3.new(594.572, 135.53, -18.316) wait() ele2.Position = Vector3.new(593.572, 135.53, -18.316) wait() ele2.Position = Vector3.new(592.772, 135.53, -18.316) wait() ele2.Position = Vector3.new(591.972, 135.53, -18.316) wait() ele2.Position = Vector3.new(590.772, 135.53, -18.316) wait() ele2.Position = Vector3.new(589.972, 135.53, -18.316) wait() ele2.Position = Vector3.new(589.172, 135.53, -18.316) wait() ele2.Position = Vector3.new(588.772, 135.53, -18.316) wait() ele2.Position = Vector3.new(588.172, 135.53, -18.316) wait() ele2.Position = Vector3.new(587.572, 135.53, -18.316) wait() ele2.Position = Vector3.new(587.372, 135.53, -18.316) wait() ele1.Position = Vector3.new(575.572, 135.53, -18.316) wait() ele1.Position = Vector3.new(574.972, 135.53, -18.316) wait() ele1.Position = Vector3.new(573.772, 135.53, -18.316) wait() ele1.Position = Vector3.new(572.572, 135.53, -18.316) wait() ele1.Position = Vector3.new(570.771, 135.53, -18.316) wait() ele1.Position = Vector3.new(569.371, 135.53, -18.316) wait() ele1.Position = Vector3.new(567.971, 135.53, -18.316) wait() ele1.Position = Vector3.new(567.571, 135.53, -18.316) wait(3) ele1.Position = Vector3.new(569.171, 135.53, -18.316) wait() ele1.Position = Vector3.new(570.571, 135.53, -18.316) wait() ele1.Position = Vector3.new(571.971, 135.53, -18.316) wait() ele1.Position = Vector3.new(573.372, 135.53, -18.316) wait() ele1.Position = Vector3.new(574.372, 135.53, -18.316) wait() ele1.Position = Vector3.new(575.172, 135.53, -18.316) wait() ele1.Position = Vector3.new(575.772, 135.53, -18.316) wait() ele1.Position = Vector3.new(576.772, 135.53, -18.316) end end end touchbrick.Touched:connect(t)
Hope it worked...
Closed as Not Constructive by User#5978, neoG457, MessorAdmin, and LegitimatlyMe
This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.
Why was this question closed?