Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Part = Instance.new("Part")
- Part.Parent = game.Workspace
- Part.Size = Vector3.new(5, 9, 1)
- Part.Position = Vector3.new(0, 4.5, 5)
- Part.Anchored = true
- Part.CanTouch = false
- function thinghere()
- touching = true
- while touching do
- if Part.CFrame ~= CFrame.new(2.5,0,0) then
- Part.CFrame = Part.CFrame * CFrame.new(0.05,0,0)
- task.wait()
- end
- end
- end
- else
- touching = false
- end
- function thinghere2()
- touching = false
- while not touching do
- if Part.CFrame ~= CFrame.new(-2.5,0,0) then
- Part.CFrame = Part.CFrame * CFrame.new(-0.05,0,0)
- task.wait()
- end
- end
- end
- else
- touching = true
- end
- part1 = Instance.new("Part", game.Workspace)
- part1.Size = Vector3.new(10,9,5)
- part1.Position = Vector3.new(0,4.55,0)
- part1.Anchored = true
- part1.CanCollide = false
- part1.Transparency = 0.75
- part1.Touched:Connect(thinghere)
- part1.TouchEnded:Connect(thinghere2)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement