#Revolver kill doesn't give points

1 messages · Page 1 of 1 (latest)

digital vault
#

I made a death match game and you have 2 weapons knife and revolver when you kill someone with knife you get a point and weirdly when you kill someone with gun you doesn't get a point idk why it happens also when you are attack someone with knife first and kill them finnaly with a gun you got a point but when you do same thing but with a gun first you dont

digital vault
#

Wait wait

#

I will put the code in a moment

mint bobcatBOT
#

studio** You are now Level 4! **studio

digital vault
#

Like i just put ready deathmatch mode from some youtuber and other also have this problem with not working gun

#

local Time = game.ReplicatedStorage.Time
local BlueKill = game.ReplicatedStorage.BlueKill
local RedKill = game.ReplicatedStorage.RedKill
local Status = game.ReplicatedStorage.Status
local Teams = game:GetService("Teams")

local BlueTeam = 0
local RedTeam = 0

function TimeWait(TimeToWait)
Time.Value = TimeToWait

repeat
    wait(1)
    Time.Value -= 1
until Time.Value < 1

end

game.Players.PlayerAdded:Connect(function(player)
if Status.Value == "Round in progress" then
if BlueTeam < RedTeam then
BlueTeam += 1
player.Team = Teams.Blue
player.TeamColor = Teams.Blue.TeamColor
elseif RedTeam < BlueTeam then
RedTeam += 1
player.Team = Teams.Red
player.TeamColor = Teams.Red.TeamColor
end

    wait(1)
    player:LoadCharacter()
end

player.CharacterAdded:Connect(function(character)
    character.Humanoid.Died:Connect(function()
        if character.Humanoid:FindFirstChild("creator") then
            local killer = character.Humanoid:FindFirstChild("creator").Value
            
            if killer.TeamColor == Teams.Blue.TeamColor then
                BlueKill.Value += 1
            else
                RedKill.Value += 1
            end
        end
    end)
end)

end)

#

while true do
BlueTeam = 0
RedTeam = 0
RedKill.Value = 0
BlueKill.Value = 0

for _,v in pairs(game.Players:GetChildren()) do
    v.Team = Teams.Neutral
    v.TeamColor = Teams.Neutral.TeamColor
end

wait(1)

for _,v in pairs(game.Players:GetChildren()) do
    v:LoadCharacter()
end

Status.Value = "Intermission"
TimeWait(20)

if #game.Players:GetChildren() < 1 then 
    Status.Value = "Need More Players" 
    TimeWait(5)
else
    Status.Value = "Round in progress"

    for _,v in pairs(game.Players:GetChildren()) do
        if BlueTeam <= RedTeam then
            BlueTeam += 1
            v.Team = Teams.Blue
            v.TeamColor = Teams.Blue.TeamColor

        elseif RedTeam < BlueTeam then
            RedTeam += 1
            v.Team = Teams.Red
            v.TeamColor = Teams.Red.TeamColor

        end
    end
    
    wait(1)
    
    for _,v in pairs(game.Players:GetChildren()) do
        v:LoadCharacter()
    end
    
    TimeWait(150)

    for _,v in pairs(game.Players:GetChildren()) do
        v.Team = Teams.Neutral
        v.TeamColor = Teams.Neutral.TeamColor
    end
    
    wait(1)
    
    for _,v in pairs(game.Players:GetChildren()) do
        v:LoadCharacter()
    end

    if BlueKill.Value > RedKill.Value then
        Status.Value = "Sheriffes Win!"

    elseif RedKill.Value > BlueKill.Value then
        Status.Value = "Cowboys Win!"

    else
        Status.Value = "Tie!"
    end

    TimeWait(5)
end

end

#

@gaunt wolf

gaunt wolf
#
local Time = game.ReplicatedStorage.Time
local BlueKill = game.ReplicatedStorage.BlueKill
local RedKill = game.ReplicatedStorage.RedKill
local Status = game.ReplicatedStorage.Status
local Teams = game:GetService("Teams")

local BlueTeam = 0
local RedTeam = 0

function TimeWait(TimeToWait)
    Time.Value = TimeToWait
    
    repeat
        wait(1)
        Time.Value -= 1
    until Time.Value < 1
end

game.Players.PlayerAdded:Connect(function(player)
    if Status.Value == "Round in progress" then
        if BlueTeam < RedTeam then
            BlueTeam += 1
            player.Team = Teams.Blue
            player.TeamColor = Teams.Blue.TeamColor
        elseif RedTeam < BlueTeam then
            RedTeam += 1
            player.Team = Teams.Red
            player.TeamColor = Teams.Red.TeamColor
        end
        
        wait(1)
        player:LoadCharacter()
    end
    
    player.CharacterAdded:Connect(function(character)
        character.Humanoid.Died:Connect(function()
            if character.Humanoid:FindFirstChild("creator") then
                local killer = character.Humanoid:FindFirstChild("creator").Value
                
                if killer.TeamColor == Teams.Blue.TeamColor then
                    BlueKill.Value += 1
                else
                    RedKill.Value += 1
                end
            end
        end)
    end)
end)

dont mind me just codeblocking it...

#

@digital vault what are the errors?

digital vault
#

bro you doesnt get point for killing with gun thats the problem

digital vault
#

what that means

gaunt wolf
#

oh my lord

digital vault
#

sry but im new to scrypting

gaunt wolf
#

😭

#

did you just skid this?

digital vault
#

i just started 3 days ago

gaunt wolf
#

yeah you just ai'd this

#

tsk tsk tsk

digital vault
#

so can you help me?

gaunt wolf
#

check the output for errors

digital vault
#

how to check it

digital vault
#

you doesnt need to be rude

gaunt wolf
#

im not being rude

digital vault
#

i just dont know ts

gaunt wolf
#

just dissapointed

#

go to view, and click output

digital vault
#

thx

gaunt wolf
#

so, what are the errors

digital vault
#

wait

#

i dunno how to operate that xd

digital vault
#

can you tell me how to find errors

gaunt wolf
#

itll show you

digital vault
#

okay

gaunt wolf
# digital vault

20:04:55.763 ServerEvents is not a valid member of ReplicatedStorage "ReplicatedStorage" - Serwer - ServerHandler:7

20:04:55.764 FirstPersonLock is not a valid member of Script "Workspace.Main" - Serwer - Main:1

digital vault
#

maybe thats the problem?

gaunt wolf
#

jeez.

gaunt wolf
digital vault
#

so how to get a good gun weapon

gaunt wolf
digital vault
#

hellllll nahhhh

#

and i look at this youtuber from where i got my script for game

gaunt wolf
digital vault
#

and everyone in the comments

#

has the problem with guns

#

so maybe something with script is the problem?

gaunt wolf
gaunt wolf
#

The Script is the problem

digital vault
#

but everythink works except guns point system

gaunt wolf
#

Script is still the problem

#

you find it yourself

#

and also

20:05:22.225  Failed to load animation with sanitized ID rbxassetid://6474605547: Animation failed to load, assetId: https://assetdelivery.roblox.com/v1/asset?id=6474605547&serverplaceid=0  -  Studio
  20:05:22.226  Failed to load animation with sanitized ID rbxassetid://7122813910: Animation failed to load, assetId: https://assetdelivery.roblox.com/v1/asset?id=7122813910&serverplaceid=0  -  Studio
  20:05:22.226  Failed to load animation with sanitized ID rbxassetid://7122814691: Animation failed to load, assetId: https://assetdelivery.roblox.com/v1/asset?id=7122814691&serverplaceid=0  -  Studio
  20:05:22.227  Failed to load animation with sanitized ID rbxassetid://7122815427: Animation failed to load, assetId: https://assetdelivery.roblox.com/v1/asset?id=7122815427&serverplaceid=0  -  Studio
  20:05:22.227  Failed to load animation with sanitized ID rbxassetid://7122811999: Animation failed to load, assetId: https://assetdelivery.roblox.com/v1/asset?id=7122811999&serverplaceid=0  -  Studio
  20:05:22.237  MeshContentProvider failed to process https://assetdelivery.roblox.com/v1/asset?id=8299579901 because 'could not fetch'  -  Studio
  20:05:22.238  MeshContentProvider failed to process https://assetdelivery.roblox.com/v1/asset?id=8299579168 because 'could not fetch'  -  Studio
  20:05:22.238  MeshContentProvider failed to process https://assetdelivery.roblox.com/v1/asset?id=8299579716 because 'could not fetch'  -  Studio
  20:05:22.238  MeshContentProvider failed to process https://assetdelivery.roblox.com/v1/asset?id=8299580081 because 'could not fetch'  -  Studio
  20:05:22.239  MeshContentProvider failed to process https://assetdelivery.roblox.com/v1/asset?
etc..

so much skidded messages

#

😭

digital vault
#

but did you see any problems with script i send you

gaunt wolf
granite ore
gaunt wolf
#

i dont think so

#

🤷‍♂️

granite ore
gaunt wolf
digital vault
#

uuuu so tuff

granite ore
#

youre trying to help a guy without understanding the problem

digital vault
#

bro stfu im 3 day at this

granite ore
#

get out

gaunt wolf
#

true

#

🤷‍♂️

granite ore
digital vault
#

yeah

gaunt wolf
#

alright damn 💔

granite ore
#

skid

digital vault
#

so what can i do

digital vault
#

GET OUT

granite ore
#

likee

#

this part

#

change it to

#
local hum = player.Character:WaitForChild("Humanoid")

hum.Died:Connect(function()
digital vault
#

done

granite ore
#

oh and add

local character = player.Character
#

above local hum

digital vault
#

done

#

lol now my game doesnt start

#

@granite ore

granite ore
#

how so

digital vault
#

bro idk crying

granite ore
#

is there an error saying "Possible infinite yield on :WaitFOrChild("Humanoid")

#

in the output

digital vault
#

wait

#

in the place where zero is there was timer for game to start

granite ore
#

dude

#

i think u should

#

get your own assets

#

cause that might be the problem

digital vault
#

but can you help me only with gun

#

cause before all that

#

knife kill give you points are gun kill dont

granite ore
#

the problem doesnt seem to be in the script you sent

#

is there a script in the gun

digital vault
#

wait

#

ohh shiii

granite ore
#

free assets?

digital vault
#

yeah

digital vault
#

😢

#

so i cant fix this

granite ore
#

well

#

unless you want to spend days debugging everything

#

you cant make a coherent game with free assets

#

unless its building

#

but not with scripts

#

i suggest you do things yourself, so everything works with eachother

#

otherwise itll be a mess and well

#

yeah u wont do dog shit

digital vault
#

wait i will send you where i got it

mint bobcatBOT
#

studio** You are now Level 5! **studio

granite ore
#

doesnt matter

#

ull have to learn scripting on your own

#

and sure you can use free assets but only if you know how to make them work

digital vault
granite ore
#

or like

#

steal code

granite ore
#

well idk

#

if u want a game from a tutorial u gotta follow it thorughrly and uflly

#

ig

#

i suggest not doing that tho cuz later u wont be able to do anything else lol

digital vault
#

but why kill from gun doesnt give you a point but from everything else it does

#

how is that working