Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

(SOLVED) Why does :LoadCharacter() breaks my ProximityPrompt?

So I had a ProximityPrompt on a character once they go down. After the 5 second of holding "F" they get respawned which :LoadCharacter(). Problem is that other ProximityPrompt won't work at all. Did I do something wrong?

Note: Print doesn't work either I tried that.

ProximityPrompt script:

local Anim = script.Parent.Animation
local animations = {}

script.Parent.Triggered:Connect(function(plr)
local Player = plr
    if Player:findFirstChild("leaderstats") then
        if Player.leaderstats.Points.Value>=tonumber(script.Parent.Buys.Value) then
            Player.leaderstats.Points.Value=Player.leaderstats.Points.Value-tonumber(script.Parent.Buys.Value)
            --Blah Blah script here
        end
    end
end)

script.Parent.PromptButtonHoldBegan:Connect(function(plr)
    local character = plr
 --Blah Blah script here
end)


script.Parent.PromptButtonHoldEnded:Connect(function(plr)
    local character = plr
 --Blah Blah script here
end)

:LoadCharacter()

game.ReplicatedStorage.ReviveStart.OnServerEvent:Connect(function(plr, Position)
	game.Lighting.ColorCorrection.Enabled = false
	game.Workspace.Audios.HeartBeat:Stop()
	wait(.01)
	print("This works?")
	plr:LoadCharacter()
	repeat wait() until game.workspace:FindFirstChild(plr.name)
	local char = game.workspace:WaitForChild(plr.name)
	char.HumanoidRootPart.Position = Position
	game.Workspace.Audios.Battle.MusicPlaying1:Resume()
	game.ReplicatedStorage.ReviveDone:FireAllClients()
-- Blash Blah script about music here
end)

did " --Blah Blah script here" to save space

2 comments

0

Don't move characters by changing the Position. Change their CFrame

0

alright

1 answer

Don't move characters by changing the Position. Change their CFrame - Spjureeedd

This discussion is preserved as it was. New answers, comments, and votes are closed.