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
 

Warning: 41 line script ahead(not complicated, though!)

Previous Thread :: Next Thread 
zeke505 is not online. zeke505
Joined: 26 May 2008
Total Posts: 15765
17 Oct 2010 02:50 PM
Anyway, theres no output. It just plain doesn't work. Help? Yes, RFPart is inside the hopperbin.

p = script.Parent.RFPart
p.Parent = nil

on = false

script.Parent.Selected:connect(function(mouse)
if mouse.Target and on == false then
p.Parent = workspace
p.CFrame = CFrame.new(mouse.Hit.p.x, mouse.Target.Position.y + mouse.Target.Size.y/2, mouse.Hit.p.z)
end
mouse.Move:connect(function()
if mouse.Target on == false then
p.Parent = workspace
p.CFrame = CFrame.new(mouse.Hit.p.x, mouse.Target.Position.y + mouse.Target.Size.y/2, mouse.Hit.p.z)
elseif not mouse.Target or on == true then
p.Parent = nil
end
end)
mouse.Button1Down:connect(function()
if p.Parent == workspace and game.Players.LocalPlayer.leaderstats.Mana.Value >= 25 then
pos = p.Position
cframe = p.CFrame
p.Parent = nil
on = true
game.Players.LocalPlayer.leaderstats.Mana.Value = game.Players.LocalPlayer.leaderstats.Mana.Value - 25
for i=1, 10 do
x = Instance.new("Part", workspace)
x.BrickColor = BrickColor.new("Bright red")
x.CanCollide = false
Instance.new("Fire", x)
x.Position = pos + Vector3.new(0,50,0)
x.formFactor = "Plate"
x.Size = Vector3.new(10,10,10)
x.Touched:connect(function(hit) pcall(function() hit.Parent.Humanoid:TakeDamage(25) end) end)
wait(math.random(1, 4))
game:service("Debris"):AddItem(x, 15)
end
on = false
end
end)
end)
Report Abuse
shadostriker is not online. shadostriker
Joined: 07 Aug 2008
Total Posts: 7860
17 Oct 2010 02:50 PM
Check your ifs.
Report Abuse
zeke505 is not online. zeke505
Joined: 26 May 2008
Total Posts: 15765
17 Oct 2010 02:51 PM
@shado

I did already. :L
Report Abuse
zeke505 is not online. zeke505
Joined: 26 May 2008
Total Posts: 15765
17 Oct 2010 02:57 PM
BUMP. Cmon guys, I gotta go soon!
Report Abuse
crazypotato4 is not online. crazypotato4
Joined: 22 Feb 2010
Total Posts: 20000
17 Oct 2010 02:59 PM
"if mouse.Target on == false then"

might that be a problem?

if mouse.Target ~= nil and on == false then

that may work better...
Report Abuse
zeke505 is not online. zeke505
Joined: 26 May 2008
Total Posts: 15765
17 Oct 2010 03:00 PM
Woops, can't believe I forgot the "and" :P
Report Abuse
zeke505 is not online. zeke505
Joined: 26 May 2008
Total Posts: 15765
17 Oct 2010 03:04 PM
It works now, thanks!
Report Abuse
crazypotato4 is not online. crazypotato4
Joined: 22 Feb 2010
Total Posts: 20000
17 Oct 2010 03:04 PM
lol, 3 letters caused your script to break :D
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