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

Function Return Help? attempt to concatenate string with function

Asked by 4 years ago

The error is on line 29, trying to set the name so in another script it can tell if the part touched anything. I am purposely doing this on the client side. If there is anyway I can do this inside this script keeping it on the client, let me know. Here is my local script, inside a tool:

01local gun = script.Parent
02local ammo = game.ReplicatedStorage.NormalGunAmmo
03local ActiveBullets = game.Workspace.ActiveBullets
04 
05local player = game.Players.LocalPlayer
06local mouse = player:GetMouse()
07 
08local debounce = false
09local count = 0
10 
11local function number()
12    for i,v in pairs(ActiveBullets:GetChildren())do
13        count = count+1
14    end
15    return count
View all 33 lines...

Error is in the title, and again, it occurs on line 29 trying to set the name, thanks!

0
Plus, you should declare another variable, since the script can get confused. CrypxticDoge 135 — 4y
0
plus? JailBreaker_13 350 — 4y
0
Replace line 29 with bullet.Name = "Bullet"..number() rabbi99 714 — 4y
0
thanks! JailBreaker_13 350 — 4y

Answer this question