generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

help if ur not bad

Previous Thread :: Next Thread 
len_ny is not online. len_ny
Joined: 25 Sep 2014
Total Posts: 242
11 Dec 2016 07:33 PM
sooooo i was thinkin on makin a script for a enemy type defense game and it seems the enemy doesnt like to go into the ending where i have its designated destination to
the script works it has the enemy continuely spawning and stuff but the enemy doesnt go into the actual block i tell it to go to

Heres the Module Script:
local self = {}

function self:StartEnemy(source, enemy) --Source is an array of our nodes that have been collected by central script.
local stats = require(game.ReplicatedStorage.Modules.Types.EnemyStats) --Returns the Enemies Table

stats = stats[enemy]

local obj = game.ReplicatedStorage.Assets.Enemies[enemy]:Clone() --Obj = Object
obj.CFrame = source["StartingPoint"].CFrame
obj.Parent = workspace
for i = 1,#source,1 do
local scf = obj.CFrame
for j=0,1, stats.Speed*0.002 do
obj.CFrame = scf:lerp(source[i].CFrame+Vector3.new(0,obj.Position.Y-source[i].Position.Y,0), j)
wait(0.01)
end
end
end

return self

Heres for Testing it out:
local enemyai = require(game.ServerScriptService.Modules.Classes.Enemies.EnemyAI)

local source = {}

for _,n in pairs(workspace.Course.Paths:GetChildren()) do
source[n.Tag.Value] = n
end

source["StartingPoint"] = workspace.Course.Other.StartPath

while wait() do
spawn(function()
enemyai:StartEnemy(source, "Regular")
end)
wait(10)
end

anything would help thanks


Report Abuse
Ryuzoji is not online. Ryuzoji
Joined: 21 Dec 2015
Total Posts: 937
11 Dec 2016 07:35 PM
@OP rude

I was gonna help 'till I saw the title and I saw no error outputs at all.


Report Abuse
Casualist is not online. Casualist
Joined: 26 Jun 2014
Total Posts: 4443
11 Dec 2016 07:37 PM
Ryuzoji[2]

Post output. Of the top of my head it sounds like you might be trying to set the CFrame of Models (which don't have that property).
Report Abuse
len_ny is not online. len_ny
Joined: 25 Sep 2014
Total Posts: 242
12 Dec 2016 06:08 AM
first there not models second theres no error it just stops mid way to the end so thats the best i can give you


Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image