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: Quick Fix, Please. <---------------

Previous Thread :: Next Thread 
LightedRoblox is not online. LightedRoblox
Joined: 16 Apr 2010
Total Posts: 6235
11 Dec 2011 01:28 PM
I'm not wearing Firefighter and Visor to show that I'm noob. It's for this project.

It was supposed to change your look when you touch a brick.

No output?
















local player = "Player" -- For Test Mode.

wait(0.1)

while true do

function onHit(hit)
if hit.Name == game.workspace.player.Name then do
game.workspace.Player.Shirt.ShirtTemplate = "http://www.roblox.com/asset/?id=49375481" -- Shirt
game.workspace.Player.PantsTemplate = "http://www.roblox.com/asset/?id=33330276" -- Pants
game.workspace.Player.GreenVisor.Handle.Mesh.MeshID = "http://www.roblox.com/asset/?id=1285237" -- Hat 1
game.workspace.Player.GreenVisor.Handle.Mesh.TextureID = "http://www.roblox.com/asset/?id=1285232" -- Hat 1 Texture
game.workspace.Player.FirefighterHat.Handle.Mesh.MeshID = "http://www.roblox.com/asset/?id=1271547" -- Hat 2
game.workspace.Player.FirefighterHat.Handle.Mesh.TextureID = "http://www.roblox.com/asset/?id=9254947" -- Hat 2 Texture
end
end

end


wait()
end
Report Abuse
LightedRoblox is not online. LightedRoblox
Joined: 16 Apr 2010
Total Posts: 6235
11 Dec 2011 01:28 PM
Bump. Help. >.>
Report Abuse
DXPower is not online. DXPower
Joined: 21 Oct 2008
Total Posts: 2866
11 Dec 2011 01:29 PM


I'm not wearing Firefighter and Visor to show that I'm noob. It's for this project.

It was supposed to change your look when you touch a brick.

No output?
















local player = "Player" -- For Test Mode.

wait(0.1)

while true do

function onHit(hit)
if hit.Name == player then
game.Workspace.Player.Shirt.ShirtTemplate = "http://www.roblox.com/asset/?id=49375481" -- Shirt
game.Workspace.Player.PantsTemplate = "http://www.roblox.com/asset/?id=33330276" -- Pants
game.Workspace.Player.GreenVisor.Handle.Mesh.MeshID = "http://www.roblox.com/asset/?id=1285237" -- Hat 1
game.Workspace.Player.GreenVisor.Handle.Mesh.TextureID = "http://www.roblox.com/asset/?id=1285232" -- Hat 1 Texture
game.Workspace.Player.FirefighterHat.Handle.Mesh.MeshID = "http://www.roblox.com/asset/?id=1271547" -- Hat 2
game.Workspace.Player.FirefighterHat.Handle.Mesh.TextureID = "http://www.roblox.com/asset/?id=9254947" -- Hat 2 Texture
end
end

end
Report Abuse
DXPower is not online. DXPower
Joined: 21 Oct 2008
Total Posts: 2866
11 Dec 2011 01:30 PM
Oops,
Take out the last end.
Report Abuse
LightedRoblox is not online. LightedRoblox
Joined: 16 Apr 2010
Total Posts: 6235
11 Dec 2011 01:34 PM
I took out last end. And my output were:


Workspace.SpawnLocation.Script:17: 'end' expected (to close 'while' at line 5) near 'eof'
Report Abuse
LightedRoblox is not online. LightedRoblox
Joined: 16 Apr 2010
Total Posts: 6235
11 Dec 2011 01:35 PM
Current:


local player = "Player" -- For Test Mode.

wait(0.1)

while true do

function onHit(hit)
if hit.Name == player then
game.Workspace.Player.Shirt.ShirtTemplate = "http://www.roblox.com/asset/?id=49375481" -- Shirt
game.Workspace.Player.PantsTemplate = "http://www.roblox.com/asset/?id=33330276" -- Pants
game.Workspace.Player.GreenVisor.Handle.Mesh.MeshID = "http://www.roblox.com/asset/?id=1285237" -- Hat 1
game.Workspace.Player.GreenVisor.Handle.Mesh.TextureID = "http://www.roblox.com/asset/?id=1285232" -- Hat 1 Texture
game.Workspace.Player.FirefighterHat.Handle.Mesh.MeshID = "http://www.roblox.com/asset/?id=1271547" -- Hat 2
game.Workspace.Player.FirefighterHat.Handle.Mesh.TextureID = "http://www.roblox.com/asset/?id=9254947" -- Hat 2 Texture
end
end
wait() -- I had to put this.
end
Report Abuse
LightedRoblox is not online. LightedRoblox
Joined: 16 Apr 2010
Total Posts: 6235
11 Dec 2011 01:38 PM
BUMP.
Report Abuse
Willingroblox123 is not online. Willingroblox123
Joined: 18 Jan 2010
Total Posts: 6872
11 Dec 2011 01:40 PM
if hit.Name == player then
The brick that hit it's name will never be "Player" because the part that hit it would be a part OF the player, so do this:
if hit.Parent.Name == player then

- ~Cool Kid just got let loose.~
Report Abuse
LightedRoblox is not online. LightedRoblox
Joined: 16 Apr 2010
Total Posts: 6235
11 Dec 2011 01:43 PM
I did. It's not changing me.
Report Abuse
rangersmash is not online. rangersmash
Joined: 18 Nov 2009
Total Posts: 2891
11 Dec 2011 02:44 PM
[ Content Deleted ]
Report Abuse
greenmario1 is not online. greenmario1
Joined: 27 Nov 2010
Total Posts: 4736
11 Dec 2011 03:33 PM
local player = "Player" -- For Test Mode.

wait(0.1)

while true do

function onHit(hit)
if hit.Name == game.workspace.player.Name then do
game.workspace.Player.Shirt.ShirtTemplate = "http://www.roblox.com/asset/?id=49375481" -- Shirt
game.workspace.Player.PantsTemplate = "http://www.roblox.com/asset/?id=33330276" -- Pants
game.workspace.Player.GreenVisor.Handle.Mesh.MeshID = "http://www.roblox.com/asset/?id=1285237" -- Hat 1
game.workspace.Player.GreenVisor.Handle.Mesh.TextureID = "http://www.roblox.com/asset/?id=1285232" -- Hat 1 Texture
game.workspace.Player.FirefighterHat.Handle.Mesh.MeshID = "http://www.roblox.com/asset/?id=1271547" -- Hat 2
game.workspace.Player.FirefighterHat.Handle.Mesh.TextureID = "http://www.roblox.com/asset/?id=9254947" -- Hat 2 Texture
end
end
Report Abuse
spikey490 is not online. spikey490
Joined: 06 Oct 2008
Total Posts: 229
11 Dec 2011 04:03 PM
local player = "Player" -- For Test Mode.

function onHit(hit)
if hit.Parent.Name == player then
hit.Parent.Shirt.ShirtTemplate = "http://www.roblox.com/asset/?id=49375481" -- Shirt
hit.Parent.PantsTemplate = "http://www.roblox.com/asset/?id=33330276" -- Pants
hit.Parent.GreenVisor.Handle.Mesh.MeshID = "http://www.roblox.com/asset/?id=1285237" -- Hat 1
hit.Parent.GreenVisor.Handle.Mesh.TextureID = "http://www.roblox.com/asset/?id=1285232" -- Hat 1 Texture
hit.Parent.FirefighterHat.Handle.Mesh.MeshID = "http://www.roblox.com/asset/?id=1271547" -- Hat 2
hit.Parent.FirefighterHat.Handle.Mesh.TextureID = "http://www.roblox.com/asset/?id=9254947" -- Hat 2 Texture
end
end
script.Parent.Touched:connect(onHit)

--im not sure what you want
Report Abuse
spikey490 is not online. spikey490
Joined: 06 Oct 2008
Total Posts: 229
11 Dec 2011 04:05 PM
local player = "Player" -- For Test Mode.

function onHit(hit)
if hit.Parent.Name == player then
hit.Parent.Shirt.ShirtTemplate = "http://www.roblox.com/asset/?id=49375481" -- Shirt
hit.Parent.Pants.PantsTemplate = "http://www.roblox.com/asset/?id=33330276" -- Pants
hit.Parent.GreenVisor.Handle.Mesh.MeshID = "http://www.roblox.com/asset/?id=1285237" -- Hat 1
hit.Parent.GreenVisor.Handle.Mesh.TextureID = "http://www.roblox.com/asset/?id=1285232" -- Hat 1 Texture
hit.Parent.FirefighterHat.Handle.Mesh.MeshID = "http://www.roblox.com/asset/?id=1271547" -- Hat 2
hit.Parent.FirefighterHat.Handle.Mesh.TextureID = "http://www.roblox.com/asset/?id=9254947" -- Hat 2 Texture
end
end
script.Parent.Touched:connect(onHit)

--if you put this script in the thing you touch it should work (I think)
Report Abuse
lewie61336 is not online. lewie61336
Joined: 29 Apr 2011
Total Posts: 93
11 Dec 2011 04:08 PM
i have no clue what you are talking about spikey
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