generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

How to remake this script to Tycoons Ownerdoor

Previous Thread :: Next Thread 
TheStels is not online. TheStels
Joined: 11 Dec 2014
Total Posts: 10
25 Mar 2016 09:18 AM
i'm making my own Tycoon, but i have a problem
I really want to make Sliding gate, but i'm not a experienced scripter
Can you guys please help me?
This script is works by radius. (If a pl near the gate it would opens)
i want to transfer this gate moving to buttons moving (Green and Red button)

SCRIPT:
local Open = false
local Radius = 13

function MoveDoors(mod)
for i = 1, 10 do
script.Parent.DoorA.Mesh.Scale = script.Parent.DoorA.Mesh.Scale + Vector3.new(-.1 * mod, 0, 0)
script.Parent.DoorB.Mesh.Scale = script.Parent.DoorB.Mesh.Scale + Vector3.new(-.1 * mod, 0, 0)
script.Parent.DoorA.Mesh.Offset = script.Parent.DoorA.Mesh.Offset + Vector3.new(.2 * mod, 0, 0)
script.Parent.DoorB.Mesh.Offset = script.Parent.DoorB.Mesh.Offset + Vector3.new(-.2 * mod, 0, 0)
wait()
end
script.Parent.DoorA.CanCollide = mod == -1
script.Parent.DoorB.CanCollide = mod == -1
end

while wait(.5) do
local openning = false
for _, v in pairs(game.Players:GetPlayers()) do
if v:DistanceFromCharacter(script.Parent:GetModelCFrame().p) < Radius then
openning = true
end
end
if openning and not Open then
MoveDoors(1)
Open = true
elseif not openning and Open then
Open = false
MoveDoors(-1)
end
end
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image