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

Why dose this happen when u die?

Asked by 3 years ago
Edited 3 years ago

So im helping with a difficulty chart game on roblox but it has this bug sometimes when u die u wont respawn and u are able to like fly around everywhere but u are not able to see ur avatar its like u can fly, u have god mode, nobody can see you. Its weird and if people can just fly around in a obby its kinda cheap anybody know anything about this and a way to fix it might have been this script here tho not to sure

local TweenService = game:GetService("TweenService")
local TweenInformation = TweenInfo.new(1.5,Enum.EasingStyle.Quint,Enum.EasingDirection.Out,0,false,0)
for i,v in pairs(script.Parent:GetChildren()) do
    if v:IsA("BasePart") then
        v.Touched:Connect(function(hit)
            local humanoid = hit.Parent:FindFirstChild("Humanoid")
            if humanoid ~= nil then
                local player = game.Players:GetPlayerFromCharacter(humanoid.Parent)
                if player ~= nil then
                    if player.leaderstats.Level.Value == tonumber(v.Name) - 1 then
                        player.leaderstats.Level.Value += 1
                        local Destiny = {Orientation = Vector3.new(0,360,0),Color = v.CheckpointColor.Value}
                        local DecorationTween = TweenService:Create(v,TweenInformation,Destiny)
                        DecorationTween:Play()
                    end
                end
            end
        end)
    end
end

1 answer

Log in to vote
0
Answered by
DemGame 271 Moderation Voter
3 years ago

Hello,

Do you have a freecam/spectate on death script anywhere in your game? If so, try deleting it and see if it is fixed then.

0
Nope did not work i would send a video but dosent allow me to Totallynot_Zenta 1 — 3y
0
Try going into studio, pressing ctrl + shift + f, and then searching up .Died(). Then try deleting the script where it appears in. DemGame 271 — 3y
Ad

Answer this question