I have tried alot but it doesnt seem to work please help! Thank you
You need to use a Touched event for when the character touches the part, and then you need to get the player from the character, then you need to modify the GUI in the PlayerGui. Put this in the part:
01 | debounce = false |
02 | script.Parent.Touched:connect( function (hit) |
03 | if debounce = = true then return end -- Make sure it doesn't modify more than once |
04 | debounce = true |
05 | if hit.Parent:findFirstChild( "Humanoid" ) then -- Make sure it's a player touching it |
06 | player = game.Players:getPlayerFromCharacter(hit.Parent) --Finds the character |
07 | if player ~ = nil then --Just a safe-guard |
08 | Gui = player.PlayerGui.MODIFYTHEGUISTUFFHERE -- Yeah |
09 | end |
10 | end |
11 | debounce = false |
12 | end ) |
You need to learn the touched event. Then somehow find the Character. After that do :GetPlayerFromCharacter() THen go to the the PlayerGui and ScreenGui And TextLabel. Then change the text.