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: Why doesn't this script work?

Previous Thread :: Next Thread 
kuttlauri109 is not online. kuttlauri109
Joined: 22 Jun 2009
Total Posts: 1825
16 May 2013 11:32 AM
So, I made a script work on group only membres, but doesn't seems to work

group = 652333
function onRespawned(player)
if newPlayer:IsInGroup(group)
then
while true do
if player.Character ~= nil then break end
wait(.1)
end
local kk = player.Character.Head:clone()
player.Character.Head.Transparency = 1
player.Character.Head.CanCollide = true
kk.Name = "HeadSee"
kk.Parent = player.Character
local gg = player.Character.Torso.Neck:clone()
gg.Parent = player.Character.Torso
gg.Part1 = kk
player.Character.HeadSee.BrickColor = player.Character.Head.Brickcolor
player.Character.HeadSee.Transparency = 0
player.Character.HeadSee.face:remove()
player.Character.HeadSee.CanCollide = false
wait(.1)
while true do
wait(.03)
if player.Character.HeadSee.BrickColor ~= player.Character.Head.BrickColor then
player.Character.HeadSee.Brickcolor = player.Character.Head.BrickColor
else
break
end
end
end
function onPlayerEntered(newPlayer)
newPlayer.Changed:connect(function (property)
if (property == "Character") then
onRespawned(newPlayer)
end
end)
end
game.Players.PlayerAdded:connect(onPlayerEntered)
end

Report Abuse
BuildingTheTrust is not online. BuildingTheTrust
Joined: 10 Jan 2012
Total Posts: 7
16 May 2013 11:32 AM
Any output?
Report Abuse
kuttlauri109 is not online. kuttlauri109
Joined: 22 Jun 2009
Total Posts: 1825
17 May 2013 11:19 AM
Nope, but this is the clean version of the script.


function onRespawned(player)
while true do
if player.Character ~= nil then break end
wait(.1)
end
local kk = player.Character.Head:clone()
player.Character.Head.Transparency = 1
player.Character.Head.CanCollide = true
kk.Name = "HeadSee"
kk.Parent = player.Character
local gg = player.Character.Torso.Neck:clone()
gg.Parent = player.Character.Torso
gg.Part1 = kk
player.Character.HeadSee.BrickColor = player.Character.Head.Brickcolor
player.Character.HeadSee.Transparency = 0
player.Character.HeadSee.face:remove()
player.Character.HeadSee.CanCollide = false
wait(.1)
while true do
wait(.03)
if player.Character.HeadSee.BrickColor ~= player.Character.Head.BrickColor then
player.Character.HeadSee.Brickcolor = player.Character.Head.BrickColor
else
break
end
end
end

function onPlayerEntered(newPlayer)
newPlayer.Changed:connect(function (property)
if (property == "Character") then
onRespawned(newPlayer)
end
end)
end
game.Players.PlayerAdded:connect(onPlayerEntered)
Report Abuse
kuttlauri109 is not online. kuttlauri109
Joined: 22 Jun 2009
Total Posts: 1825
17 May 2013 11:56 AM
Bump
Report Abuse
cannonssk is not online. cannonssk
Joined: 02 Mar 2010
Total Posts: 278
17 May 2013 12:36 PM
what doesnt work about it?

and why is this in ()?

if (property == "Character") then




if property == "Character" then
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