Text not appearing for local player

Hello! I have been struggling a few days with my gui issue and been trying to fix it and nothing seems to be helping. I brought it here because I’m getting mad over it.


Hope this helps.

Hey.
This is because you cant access the local player like that on a normal server.

Instead, provide a param in your touched event,and check if it has a humanoid, and then use GetPlayerFromCharacter to get the player.

How would I implement that into my script though?

game.Workspace.Pushover.Touched:Connect(function(hit)
local isModel = hit:FindFirstAncestorWhichIsA("Model")
if IsModel then
local IsHumanoid = IsModel:FindFirstChild("Humanoid")
if IsHumanoid then
local Player =  game.Players:GetPlayerFromCharacter(hit.Paren t)
             if player then
                  --rest of code
             end
         end
     end
end)

So would it still let me make the text with the gui appear for the player?

Where I wrote 'rest of code`, show the text there, access his Ui through Player.PlayerGui.

Alright. Thank you! I was so mad at this.

Hey! I had time to test and not sure what IsModel would do…

It finds the first Ancestor that is a model (in this case that would be the player’s character, I believe)