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
 

It have no output and its not functioning.

Previous Thread :: Next Thread 
TheRedAngel is not online. TheRedAngel
Joined: 17 Apr 2012
Total Posts: 471
24 May 2012 05:44 PM
the ray pary perhaps not shooting and it wont print anything



--[[TheRedAngel's Personal, Simple Vampire Script]]


wait(0.08)
print'Vampire Script Loaded'
script.Name = "Vampire"

local player = script.Parent
local humanoid = player.Humanoid
local face = player.Head.face
local bite = false

humanoid.Running:connect(function ()
for i,v in pairs(workspace:GetChildren()) do
if v:findFirstChild("Vampire") == nil then
if v:findFirstChild("Humanoid") ~= nil and v:findFirstChild("Head") ~= nil and v:findFirstChild("Torso") ~= nil then
if v.Head:findFirstChild("face") ~= nil then
if (v.Head.Position - player.Head.Position).magnitude <= 10 then
bite = true
face.Texture = "http://www.roblox.com/asset/?id=29761513"
else
bite = false
face.Texture = "http://www.roblox.com/asset/?id=30046101"
end
end
end
end
end
end)

player.Head.Touched:connect(function (hit)
if bite == true then
if hit.Parent:findFirstChild("Vampire") ~= nil then
script:clone().Parent = hit.Parent
end
end
end)

while wait(0.5) do --here
if game.Lighting.TimeOfDay > "05:35:56" and game.Lighting.TimeOfDay < "18:23:48" then
local ray = Ray.new(player.Head.Position + Vector3.new(0,1,0),game.Lighting:GetSunDirection() * 400)
local hit,position = workspace:FindPartOnRay(ray, player)
if hit then
if day == false then
print'Safe'
if player.Torso:findFirstChild("Smoke") ~= nil then
player.Torso:findFirstChild("Smoke"):Destroy()
end
else
print'Danger!'
if player.Torso:findFirstChild("Smoke") == nil then
Instance.new("Smoke", player.Torso)
end
wait(30)
if hit then
humanoid.Health = 0
end
end
end
end
end
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