Here’s what I changed: I added a variable for the character, which waits if it is not found, as I noticed that printing the character as the function was fired returned nil (the character didn’t exist yet.)
I still have a question, I have this script that makes it so only other players can see the proximity prompt, but it doesn’t seem to work
here is my script:
local player = game.Players.LocalPlayer
local char = player.Character or player.CharacterAdded:Wait()
char.ChildAdded:Connect(function(child)
if child:IsA("ProximityPrompt") then
if child.Parent == char then
child.Enabled = false
end
end
end)
Since the server code runs before the ChildAdded fires in this case, the ChildAdded event is futile. Here’s what I did instead:
local player = game.Players.LocalPlayer
local char = player.Character or player.CharacterAdded:Wait()
local proximityPrompt = char:WaitForChild("ClashPrompt") :: ProximityPrompt -- The :: ProximityPrompt basically says "This IS a proxy prompt"
proximityPrompt.Enabled = false