#Stomp people on death

67 messages · Page 1 of 1 (latest)

vast estuary
#

I mean

#

you don't have to do that

#

you can just enable the proximity prompt 😅

#

and have it "just there"

round garnet
round garnet
#

oh yea i know that but it will be more easy if it just clone the replicated storage when the person died

round garnet
vast estuary
#

it's literally just a line of code

#

I don't get your reasoning

vast estuary
paper kiln
vast estuary
#

note: is not a great idea to put scripts in objects you should stop doing that when it's convenient for you

vast estuary
paper kiln
#

yes

round garnet
paper kiln
#

what

round garnet
#

im learning lua

#

so adding an proximity prompt

#

when the player spawn

paper kiln
#

proximity prompts have a property called Enabled

round garnet
#

i know

paper kiln
#

just toggle it

round garnet
#

but to put in player

paper kiln
#

put it in the humanoidrootpart

round garnet
#

but how

vast estuary
#

you can leverage the character added event here

paper kiln
#

when a players character is added just create a proximity prompt

vast estuary
#

it fires every single time the character spawns

round garnet
#

for the proximity prompt enabled i do a server script or a local one

paper kiln
#

server script

vast estuary
#

if you do t hat client sided

#

the server will ignore you

#

and it'll just be enabled for the player that died

#

not the rest of the players

#

99% of the code that runs on the client you write

#

the server is oblivious to

round garnet
#

is that good /

vast estuary
#
  1. Try it
#
  1. no
#

you just wrote a function

paper kiln
#

lol

round garnet
#

okey

#

i got a thing on roblox dev forum

#

Players.PlayerAdded:Connect(function(player)
    local ProximityPrompt = Instance.new("ProximityPrompt")
    
    player.CharacterAdded:Wait()
    
    ProximityPrompt.Parent = player.Character:WaitForChild("HumanoidRootPart")
end)```
paper kiln
#
local Prox = Instance.new("ProximityPrompt")
-- other changes here like distance
Prox.Parent = character.HumanoidRootPart
round garnet
vast estuary
#

when the player respawns

#

no more prox prompt

#

a.k.a it wont work

#

you need to do it on CharacterAdded

#

so just add the character added event

#

INSIDE the PlayerAdded you have there

#

and copy paste the code inside it

#

that's all you have to do, and it will work properly

round garnet
#

im lost

#

sorry im french so sometime i don't understand all