#How to make patrol like tower defense simulator

92 messages · Page 1 of 1 (latest)

dreamy hollow
#

[atrol?

#

patrol?

#

units on the track?

#

I am just gonna help not make an entire script

#

Just make it like the zombies but move it in reverse

unborn aspen
#

I have car

#

But how

#

i make

#

and why

#

22

dreamy hollow
#

I told you

unborn aspen
#

21

#

20

#

18

#

16

#

17

dreamy hollow
#

WHAT ARE YOU DOING

unborn aspen
#

so working

dreamy hollow
#

Send ur roblox profile

eternal vine
dreamy hollow
#

I am 60% sure underage

unborn aspen
dreamy hollow
#

Gameroblox1234 as a profile name?

#

Hmm ok

#

so what do you want to so

#

I just told you

#

what to do

#

I can't make an entire script for you

unborn aspen
#

No

#

Me need

eternal vine
#

Does it hurt to google it you twat?

unborn aspen
#

That the car would go the other way, but that's it.

#

make reverse

dreamy hollow
#

You expect someone to make an entire script for you

unborn aspen
#

no...

eternal vine
#

#💵︱hiring

dreamy hollow
unborn aspen
#

The whole script is if you put a car and that would leave at a certain time

dreamy hollow
#

ok

#

Make the car go in reverse

unborn aspen
#

How to say I did, but somehow with an error

dreamy hollow
#

like the enemies you made a function in the module

unborn aspen
#

This points:
22
20
19
18
16
17

dreamy hollow
#

Just make a car script like thatn with few changes

unborn aspen
#

But no 21

#

And why 18 16 17

dreamy hollow
#

SEND UR SCRIPT

unborn aspen
#

I wait

#

Instaling Roblox Studio

dreamy hollow
#

What?

#

gronk please help him/her

unborn aspen
#

I man

dreamy hollow
#

?

#

send ur script

unborn aspen
#

This console

#

@dreamy hollow

dreamy hollow
#

show explorer

unborn aspen
dreamy hollow
unborn aspen
#

?

dreamy hollow
#

nvm

unborn aspen
#

So what to do?

eternal vine
eternal vine
dreamy hollow
#

read it.

#

-_

#

-_-

eternal vine
#

Does their script not work?

#

Ah, it's counting wrong

unborn aspen
eternal vine
#

Right

#

Put wait() in your loop

#

That's just standard

#

You're using ipairs so it should preserve the order

#

Weird, this should work..

jade fjord
#

task.wait()

unborn aspen
#

yes

eternal vine
jade fjord
#

anyways good luck you too

unborn aspen
#

i use task.wait()

eternal vine
#

Get your ass back here S2

jade fjord
#

no

eternal vine
#

He needs help 😭

unborn aspen
#

local waypoints = workspace.Snake.Waypoints:GetChildren()

Can here error?

#

local PhysicsService = game:GetService("PhysicsService")
local ServerStorage = game:GetService("ServerStorage")

local patrol = {}

function patrol.Move(patrol, map)
local humanoid = patrol:WaitForChild("Humanoid")
local waypoints = map.Waypoints:GetChildren()

for index, waypoint in ipairs(waypoints) do
    index = #waypoints - index
    patrol.MovingTo.Value = index
    print(waypoints[index])
    humanoid:MoveTo(waypoints[index].Position)
    humanoid.MoveToFinished:Wait()
end


workspace.Mobs.Zombie.Humanoid:TakeDamage(humanoid.Health)

end

function patrol.Spawn(name, quantity, map)
local patrolExists = ServerStorage.Cars:FindFirstChild(name)

if patrolExists then
    for i=1, quantity do
        task.wait(1)
        local newpatrol = patrolExists:Clone()
        newpatrol.HumanoidRootPart.CFrame = map.End.CFrame
        newpatrol.Parent = workspace.patrols
        newpatrol.HumanoidRootPart:SetNetworkOwner(nil)

        local movingTo = Instance.new("IntValue")
        movingTo.Name = "MovingTo"
        movingTo.Parent = newpatrol

        for i, object in ipairs(newpatrol:GetDescendants()) do
            if object:IsA("BasePart") then
                PhysicsService:SetPartCollisionGroup(object, "Car")
            end
        end

        newpatrol.Humanoid.Died:Connect(function()
            task.wait(0.2)
            newpatrol:Destroy()
        end)

        coroutine.wrap(patrol.Move)(newpatrol, map)
    end
else
    warn("Requested patrol does not exist:", name)
end

end

return patrol