Help With A Touched Script?
01 | s = script.Parent.Parent.Head |
02 | w = script.Parent.Parent |
03 | local r = script.Parent |
04 | local players = game:GetService( "Players" ) |
06 | r.Touched:connect( function (part) |
07 | local player = part and part.Parent and players:GetPlayerFromCharacter(part.Parent) |
09 | local humanoid = part.Parent:FindFirstChild( "Humanoid" ).Parent |
10 | if humanoid.Name = = "Scootakip" then |
12 | s.BrickColor = BrickColor.new( "Really blue" ) |
14 | w.Name = "Find Out If You're Scootakip" |
15 | s.BrickColor = BrickColor.new( "White" ) |
17 | if humanoid.Name ~ = "Scootakip" then |
19 | s.BrickColor = BrickColor.new( "Really red" ) |
21 | w.Name = "Find Out If You're Scootakip" |
22 | s.BrickColor = BrickColor.new( "White" ) |
This script works fine the way it is, but I need help changing it. Right now if you step on it, something activates and then goes back to normal 3 seconds after, but what I want is that it stays activated as long as the player is on the brick, and deactivates as soon as they step off. Can someone either tell me how to do that or give me a link to a page that will tell me how to do it?