#hi i have some problems in a moving system look vid i think those are the collisions maybe
1 messages · Page 1 of 1 (latest)
It's me ketamine add me back
oh yes i forgot ty to remind me
.
bro do you need to have live collabs and asset manager open all the time? 
why are you doing this so complicated
@tiny sage
so i can do rounds easily after
you mean the script or assets manager being open
script
oh now i can add new maps whenever i want or enemies
i dont have a script per enemy also so i dont use to much memory
game.ServerStorage.bindables.EnemySpawned.Event:Connect(function(enemyModel, map)
local rootpart = enemyModel:FindFirstChild("HumanoidRootPart")
local humanoid = enemyModel:FindFirstChild("Humanoid")
local wayPoints = {}
local wayPointCount = map:FindFirstChild("Waypoints"):FindFirstChild("ammount").Value
for i = 1, wayPointCount do
table.insert(wayPoints, map:FindFirstChild("Waypoints"):FindFirstChild(tostring(i)))
end
print(humanoid)
humanoid:MoveTo(wayPoints[1].Position)
end)
game.ServerStorage.bindables.EnemySpawned.Event:Connect(function(enemyModel, map)
local rootpart = enemyModel:FindFirstChild("HumanoidRootPart")
local humanoid = enemyModel:FindFirstChild("Humanoid")
local waypoints = map:FindFirstChild("Waypoints"):GetChildren()
if not rootpart or humanoid then return end
for _, waypoint in waypoints do
print(humanoid)
humanoid:MoveTo(waypoint.Position)
humanoid.MoveToFinished:Wait()
end
end)
Why wouldnt my script work
the lower one
idk send vid of what is not working or write
The for loops
Try replace _, with i,
Okay then dont ask me
You're clowning just because I didnt finished my words yet
no _ is fine if you dont use the index
why are you asking then..
I asked you why you are overcomplicating your script and why mine wouldnt work for you????????
That arent overcomplicating, the indexes are essentially important for sorting
alr mb
wait
gimme a sek
game.ServerStorage.bindables.EnemySpawned.Event:Connect(function(enemyModel, map)
local rootpart = enemyModel:FindFirstChild("HumanoidRootPart")
local humanoid = enemyModel:FindFirstChild("Humanoid")
local waypoints = map:FindFirstChild("Waypoints"):GetChildren()
if not rootpart or humanoid then return end
table.sort(waypoints, function(a, b)
return a.Name < b.Name
end)
for _, waypoint in waypoints do
print(humanoid)
humanoid:MoveTo(waypoint.Position)
humanoid.MoveToFinished:Wait()
end
end)
it is the same with a for loop as sayed i just used go to waypoint 1 bcs im fixing the bug
this will fix your problem
make one with higher speed now and see
local physcics = game:GetService("PhysicsService")
physcics:RegisterCollisionGroup("NonPlayerColissionGroup")
physcics:RegisterCollisionGroup("Map")
physcics:RegisterCollisionGroup("Enemy")
physcics:CollisionGroupSetCollidable("Enemy","Default",false)
physcics:CollisionGroupSetCollidable("Enemy","Enemy",false)
function enemie:Spawn(pos, parent)
print("spawning")
local enemyClone = self.model:Clone()
local guiClone = self.gui:Clone()
enemyClone.HumanoidRootPart.CollisionGroup = 'Enemy'
enemyClone.Parent = parent
enemyClone.HumanoidRootPart:SetNetworkOwner(nil)
enemyClone["HumanoidRootPart"].Position = pos
guiClone.Parent = enemyClone
guiClone.Enabled = true
game.ServerStorage.bindables.EnemySpawned:Fire(enemyClone,parent.Parent)
return enemyClone
end
i still think its easy
Mine can collide
me to that is what gets wrong every time it kind of glitchy and on the end it is just chaos
there is only the rootpart rn i dont have model yet
hm
local PhysicsService = game:GetService("PhysicsService")
local RigsFolder = workspace:WaitForChild("Rigs")
local GROUP_NAME = "RigNoCollide"
PhysicsService:RegisterCollisionGroup(GROUP_NAME)
PhysicsService:CollisionGroupSetCollidable(GROUP_NAME, GROUP_NAME, false)
local function applyCollisionGroup(model: Model)
for _, part in model:GetDescendants() do
if part:IsA("BasePart") then
part.CollisionGroup = GROUP_NAME
end
end
end
for _, rig in RigsFolder:GetChildren() do
if rig:IsA("Model") then
applyCollisionGroup(rig)
end
end
Fr im sorry but I dont really use collisiongroups so I cant really tell you what your problem is I can just tell you that this script works perfectly fine for my rigs
i'll try with rigs maybe it will work bcs in model there is only one part
you should defo try rigs cause the got health also
any humanoid got health it is a proprity
works now
nicwe