Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
-1

Help with a car that follows a player if it sees a player and if a player touches it it dies?

Asked by 10 years ago

Here is the script

function SeeFollow(player)
if Car.Player.NearPosition then --If the car is near a player,continue
Car = Follow.Player.Position --Follow the player
end
Car.Follow:connect(SeeFollow)
function onTouch(player)
Player.Touched.Health = 0 --If a player touched the car, it dies
end
Car.Touched:connect(onTouch)
0
Did you really try to make this script, or are you expecting us to make the script for you? M39a9am3R 3210 — 10y
0
Really trying.I'm not that good at scripting iluvmaths1123 198 — 10y
0
Man, look at the wiki for proper API usage... OniiCh_n 410 — 10y

1 answer

Log in to vote
3
Answered by
Shawnyg 4330 Trusted Badge of Merit Snack Break Moderation Voter Community Moderator
10 years ago

It seems you either didn't try and wanted us to do it, or do not know how to properly use Lua. There's no Health property of the Touched event.. I recommend you spend a lot of time on the Wiki getting everything down. You'll need to learn magnitude.

0
Some psychiatric help might also be a good idea. Ekkoh 635 — 10y
0
WHAT DOES MAGNITUDE MEAN iluvmaths1123 198 — 10y
0
I updated it with a link Shawnyg 4330 — 10y
0
Cool iluvmaths1123 198 — 10y
View all comments (2 more)
0
Accept my answer if this helped! Shawnyg 4330 — 10y
0
Srry for caps on my what is magnitude comment XD iluvmaths1123 198 — 10y
Ad

Answer this question