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 » Scripting Helpers
Home Search
 

Re: What's wrong with this script?

Previous Thread :: Next Thread 
cyclone3260 is not online. cyclone3260
Joined: 23 Aug 2010
Total Posts: 1038
15 Jul 2012 04:38 PM
script.Parent.Touched:connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") then
local i = Instance.new("Message",game.Workspace)
i.Text = "START!"
wait(1)
i:Destroy()
wait(5)
for i = 113.4,241.4 do
game.Workspace.Drown.CFrame=CFrame.new(-568, i, -259)
wait()
game.Workspace.Drown.CFrame=CFrame.new(-568, 113.4, -259)
end
end
end)
--------------
The Message pops up but The "Drown brick" Dont move...

Use same function! Please ;)


~Thanks!
Report Abuse
cyclone3260 is not online. cyclone3260
Joined: 23 Aug 2010
Total Posts: 1038
15 Jul 2012 04:39 PM
And also, could you add a debounce?


Thank you.
Report Abuse
ninjaknight101 is not online. ninjaknight101
Joined: 04 Apr 2011
Total Posts: 1281
15 Jul 2012 04:59 PM
db = false


script.Parent.Touched:connect(function(hit)
if db == false then
if hit.Parent:FindFirstChild("Humanoid") then
local i = Instance.new("Message",game.Workspace)
i.Text = "START!"
wait(1)
i:Destroy()
wait(5)
for i = 113.4,241.4 do
game.Workspace.Drown.CFrame=Vector3.new(-568, i, -259)
wait()
game.Workspace.Drown.CFrame=Vector3.new(-568, 113.4, -259)
end
end
else
db = true
wait(3)
db = false
end
end)
Report Abuse
ninjaknight101 is not online. ninjaknight101
Joined: 04 Apr 2011
Total Posts: 1281
15 Jul 2012 05:00 PM
When you adjust something's CFrame, it takes 12 values, unless it's a Vector3.new.
Report Abuse
michael1784 is not online. michael1784
Joined: 15 Feb 2011
Total Posts: 3322
15 Jul 2012 05:02 PM
script.Parent.Touched:connect(function(hit))
Report Abuse
ninjaknight101 is not online. ninjaknight101
Joined: 04 Apr 2011
Total Posts: 1281
15 Jul 2012 05:03 PM
^No, he has it right. It works. He said the part doesn't move. CFrame positioning on an X,Y,Z axis requires Vector3
Report Abuse
michael1784 is not online. michael1784
Joined: 15 Feb 2011
Total Posts: 3322
15 Jul 2012 05:05 PM
local i = Instance.new("Message")
i.Parent = game.Workspace
Report Abuse
michael1784 is not online. michael1784
Joined: 15 Feb 2011
Total Posts: 3322
15 Jul 2012 05:07 PM
Oh xD
Report Abuse
BobbyisLOLZ is not online. BobbyisLOLZ
Joined: 17 Aug 2010
Total Posts: 8045
15 Jul 2012 05:09 PM
^

....
Report Abuse
michael1784 is not online. michael1784
Joined: 15 Feb 2011
Total Posts: 3322
15 Jul 2012 08:10 PM
Did it work?
Report Abuse
ninjaknight101 is not online. ninjaknight101
Joined: 04 Apr 2011
Total Posts: 1281
15 Jul 2012 10:18 PM
^He did that right as well. The second argument to Instance.new is the parent of it.
Report Abuse
BobbyisLOLZ is not online. BobbyisLOLZ
Joined: 17 Aug 2010
Total Posts: 8045
15 Jul 2012 11:08 PM
^
yep
Report Abuse
michael1784 is not online. michael1784
Joined: 15 Feb 2011
Total Posts: 3322
16 Jul 2012 01:35 AM
Oh. I must have a different way of scripting..
Report Abuse
cyclone3260 is not online. cyclone3260
Joined: 23 Aug 2010
Total Posts: 1038
16 Jul 2012 06:09 PM
@Ninja.. Message showed but nothing rose. :(
Report Abuse
SmallC5692 is not online. SmallC5692
Joined: 12 Feb 2011
Total Posts: 113
16 Jul 2012 06:26 PM
it would be:
h = hit.Parent:findFirstChild("Humanoid")
if h~= nil then
Report Abuse
SmallC5692 is not online. SmallC5692
Joined: 12 Feb 2011
Total Posts: 113
16 Jul 2012 06:27 PM
Or maybe because there's 2 "i" variables.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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