|
| 29 Jun 2016 11:20 AM |
| I have some horses in my place, and I made one that has slightly different colors. I want that specific horse to kill anyone else if they try to sit on it, as it has a seat. I don't want it to kill on touch, because that would pose problems if I was riding by someone and they touched it. Only if they actually sit on it. I have an idea of how to do this, maybe the script would check the person sitting on it and if their name isn't "somuchbetter" it kills them. |
|
|
| Report Abuse |
|
|
IRyan70
|
  |
| Joined: 08 Jun 2011 |
| Total Posts: 484 |
|
|
| 29 Jun 2016 11:25 AM |
| You can do that, (checking name) , or just create a bool value like "Rider" and set it true or false in relation to if they can sit on the horse or not. Just have the seat ask for that variable value |
|
|
| Report Abuse |
|
|
|
| 29 Jun 2016 11:26 AM |
I will try this and see if it works-
local seat = script.Parent seat.Changed:connect(function(property) if property ~= 'Occupant' then return end local occupant = seat.Occupant if occupant then local character = occupant.Parent local player = game.Players:GetPlayerFromCharacter(character) if player.Name ~= "somuchbetter" then player.Character.Humanoid:TakeDamage(100) end end end)
|
|
|
| Report Abuse |
|
|
|
| 29 Jun 2016 11:27 AM |
| I posted right when you posted, that could work too. |
|
|
| Report Abuse |
|
|