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
 

Re: help needed!

Previous Thread :: Next Thread 
TheRobloxian909 is not online. TheRobloxian909
Joined: 08 Aug 2013
Total Posts: 2444
22 Jul 2015 01:56 AM
script.Parent.Touched:connect(function(h)
if h.Parent.Humanoid ~= nil then
local door1 = script.Parent.Parent.Door1
local door2 = script.Parent.Parent.Door2
--Door1 Script
local size1= 8
local size2=0.2
local position=131
local position2=134.9
for i=8,0.2,0.1 do
door1.Size =CFrame.new(i,0,0)
wait()
end
for i=131,134.9,0.1 do
door1.Position = Vector3.new(0,0,i)
wait()
end

wait(3)

for i = 0.2,8,0.1 do
door1.Size = CFrame.new(i,0,0)
wait()
end

for i = 134.9, 131,0.1 do
door1.Position = Vector3.new(0,0,i)
wait()
end
end
end)

It is suppose the change size and position sidewards. But it goes upwards and it doesnt change size
Screenshot : goo(dot)gl/XnLRGI
Report Abuse
peIicans is not online. peIicans
Joined: 02 Nov 2013
Total Posts: 1148
22 Jul 2015 01:57 AM
use cframing on ur door1 thing


pelicanss
Report Abuse
ShungTzu is not online. ShungTzu
Joined: 14 Jun 2014
Total Posts: 959
22 Jul 2015 01:58 AM
h.Parent.Humanoid

That'll break every time it doesn't get a Humanoid.

h.Parent:findFirstChild'Humanoid'
Report Abuse
peIicans is not online. peIicans
Joined: 02 Nov 2013
Total Posts: 1148
22 Jul 2015 01:59 AM
^ but cframe ur door1 positions, not vector3


pelicanss
Report Abuse
ShungTzu is not online. ShungTzu
Joined: 14 Jun 2014
Total Posts: 959
22 Jul 2015 01:59 AM
door1.Size =CFrame.new(i,0,0)

Sizes are Vectoor3s, not CFrames.
Report Abuse
TheRobloxian909 is not online. TheRobloxian909
Joined: 08 Aug 2013
Total Posts: 2444
22 Jul 2015 02:00 AM
Ah, I mixed up my size with position!
Report Abuse
ShungTzu is not online. ShungTzu
Joined: 14 Jun 2014
Total Posts: 959
22 Jul 2015 02:05 AM
Positions are not CFrames either.
Report Abuse
TheRobloxian909 is not online. TheRobloxian909
Joined: 08 Aug 2013
Total Posts: 2444
22 Jul 2015 02:07 AM
I used findfirstchild and vector3's and it glitches.
Report Abuse
ShungTzu is not online. ShungTzu
Joined: 14 Jun 2014
Total Posts: 959
22 Jul 2015 02:12 AM
What did you write?
Report Abuse
TheRobloxian909 is not online. TheRobloxian909
Joined: 08 Aug 2013
Total Posts: 2444
22 Jul 2015 02:15 AM
script.Parent.Touched:connect(function(h)
if h.Parent:findfirstchild'Humanoid' ~= nil then
local door1 = script.Parent.Parent.Door1
local door2 = script.Parent.Parent.Door2
--Door1 Script
for i=8,0.2,0.1 do
door1.Size = Vector3.new(i,0,0)
wait()
end
for i=131,134.9,0.1 do
door1.Position = Vector3.new(0,0,i)
wait()
end

wait(3)

for i = 0.2,8,0.1 do
door1.Size = Vector3.new(i,0,0)
wait()
end

for i = 134.9, 131,0.1 do
door1.Position = Vector3.new(0,0,i)
wait()
end
end
end)
Report Abuse
ShungTzu is not online. ShungTzu
Joined: 14 Jun 2014
Total Posts: 959
22 Jul 2015 02:20 AM
findfirstchild

is not a function.

It's "findFirstChild", or "FindFirstChild".
Report Abuse
ShungTzu is not online. ShungTzu
Joined: 14 Jun 2014
Total Posts: 959
22 Jul 2015 02:33 AM
for i=8,0.2,0.1 do

That won't work. The limit has to be greater than the initial state of the control variable. In other words, the second parameter (0.2), in that case, must be smaller than the first (8), in that case.

for i=.2,8,0.1 do
door1.Size=door1.Size+Vector3.new(-.1,0,0)
wait()
end

should do what you want.
Report Abuse
ShungTzu is not online. ShungTzu
Joined: 14 Jun 2014
Total Posts: 959
22 Jul 2015 02:37 AM
I hope that can be understood even though I said "smaller" where I should have said "larger".
Report Abuse
TheRobloxian909 is not online. TheRobloxian909
Joined: 08 Aug 2013
Total Posts: 2444
22 Jul 2015 09:06 AM
This is what happens : http://goo(dot)gl/ZmO9Qv

script.Parent.Touched:connect(function(h)
if h.Parent:findFirstChild'Humanoid' ~= nil then
local door1 = script.Parent.Parent.Door1
local door2 = script.Parent.Parent.Door2
--Door1 Script
for i=.2,8,0.1 do
door1.Size=door1.Size+Vector3.new(-i,0,0)
wait()
end
for i=134.9,131,0.1 do
door1.Position = door1.Position+ Vector3.new(0,0,-i)
wait()
end

wait(3)

for i = 8,.2,0.1 do
door1.Size = door1.Size+Vector3.new(-i,0,0)
wait()
end

for i=131,134.9,0.1 do
door1.Position =door1.Position+ Vector3.new(0,0-,i)
wait()
end

end
end)


I tried removing the positioning bit, but it still turns out the same. :(
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