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
 

Weird Part "Teleport" Maybe Glitch?

Previous Thread :: Next Thread 
BGamers11 is not online. BGamers11
Joined: 03 Nov 2016
Total Posts: 33
26 Sep 2017 02:31 PM
So, I was trying to upgrade my roblox lua abilities trying to make my own flood escape that I'll totally not use to try to copy flood escape, and I actually found something weird: So, the water can't collide, and I made it to increases it size, but it's so weird that when the water touches a player, just a player, like me, it teleports to the highest place without bricks possible, like, it can't collide but when it ####### ## it thinks it needs to collide or what? So weird... I can send a video case necessary, but why the water part do such weird thing? (Note: it actually don't happens if I take out of my script the part of: humanoid.Touched:connect(part) like just when I connect the player to a part, if the water touches the player, the water go above of everything...)
Report Abuse
judess69er is not online. judess69er
Joined: 11 Oct 2009
Total Posts: 1132
26 Sep 2017 02:40 PM
try anchoring your part
Report Abuse
BGamers11 is not online. BGamers11
Joined: 03 Nov 2016
Total Posts: 33
26 Sep 2017 02:42 PM
It is anchored or it would fall, it not starts being vectored3
Report Abuse
judess69er is not online. judess69er
Joined: 11 Oct 2009
Total Posts: 1132
26 Sep 2017 02:46 PM
well if your trying to move a part you should just require a simple CFrame *CFrame.new script
Report Abuse
BGamers11 is not online. BGamers11
Joined: 03 Nov 2016
Total Posts: 33
26 Sep 2017 02:52 PM
So I think I'll need to use CFrame instead of Vector3 .-.
Report Abuse
judess69er is not online. judess69er
Joined: 11 Oct 2009
Total Posts: 1132
26 Sep 2017 02:59 PM
here's a quick example

-- Code --

while true do
script.Parent.CFrame = script.Parent.CFrame * CFrame.new(0,0,0) --(X,Y,Z)
wait(0.1)
end

-- Code --
Report Abuse
BGamers11 is not online. BGamers11
Joined: 03 Nov 2016
Total Posts: 33
26 Sep 2017 03:07 PM
Can you tell me a final thing? Should I use while, repeat until or for? because I tested them and each one repeat things at diferent speeds
Report Abuse
judess69er is not online. judess69er
Joined: 11 Oct 2009
Total Posts: 1132
26 Sep 2017 03:12 PM
while true do just continuously runs the code

repeat until runs the code in sequence until a condition is met

i don't personally have much experience with For loops so i couldn't say
Report Abuse
judess69er is not online. judess69er
Joined: 11 Oct 2009
Total Posts: 1132
26 Sep 2017 03:16 PM
personally it all depends on how you want your water to rise

if you want it to continuously rise without a break then you probably should use while true do

if you want it to rise then wait then rise again as a different level then wait and rise again then you should probably use the repeat until loop
Report Abuse
soutenu is online. soutenu
Joined: 09 Dec 2011
Total Posts: 1021
26 Sep 2017 03:22 PM
@judess that's not how while loops work at all, here's a more clear example:

while(condition)do
--code
end;

while(true)do
print'a';
end;

OUTPUT: a a a a...

while(false)do
print'b';
end;

OUTPUT:

why? because in Lua anything other than nil or false validates a condition
Report Abuse
soutenu is online. soutenu
Joined: 09 Dec 2011
Total Posts: 1021
26 Sep 2017 03:26 PM
@judess my point is, you could use a while loop as well:

while(water.Size~=Vector3.new(20,100,20) and wait() do
--code
end;
Report Abuse
judess69er is not online. judess69er
Joined: 11 Oct 2009
Total Posts: 1132
26 Sep 2017 03:28 PM
well that's kind of self explanatory about the "true" part of the while true do loop of course setting it to false is going to be like turning a light switch off
Report Abuse
judess69er is not online. judess69er
Joined: 11 Oct 2009
Total Posts: 1132
26 Sep 2017 03:33 PM
@soutenu

the reason i kept it simple is cause i don't exactly know his Scripting Experience and i don't really wanna throw him some code that's out of his scripting level

sure your way will work fine but its more of an intermediate loop
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