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

Why my zombies keep spawning at the same place?

Asked by 4 years ago
01local tool = script.Parent
02local RunService = game:GetService("RunService")
03 
04 
05 
06 
07    local function onActivated()
08    local zombie = game.ReplicatedStorage.Zombie
09        local human = tool.Parent.Humanoid
10        local mouse = game.Players.LocalPlayer:GetMouse()
11 
12    local e = Instance.new("Explosion")
13    e.DestroyJointRadiusPercent = 10 
14    e.Position = mouse.Hit.Position
15    e.Parent = workspace
View all 31 lines...

1 answer

Log in to vote
0
Answered by
TGazza 1336 Moderation Voter
4 years ago

try this:

01local tool = script.Parent
02local RunService = game:GetService("RunService")
03 
04 
05 
06 
07    local function onActivated()
08    local zombie = game.ReplicatedStorage.Zombie
09        local human = tool.Parent.Humanoid
10        local mouse = game.Players.LocalPlayer:GetMouse()
11 
12    local e = Instance.new("Explosion")
13    e.DestroyJointRadiusPercent = 10 
14    e.Position = mouse.Hit.Position
15    e.Parent = workspace
View all 36 lines...

just swapped out moving its HumanoidRootPart with the inbuilt Model:MoveTo(Vector3)

Hope this helps! :)

0
So if they spawn in the same place make more spawns and put more of the thing you want on the spawn chase_chasas 0 — 4y
Ad

Answer this question