so what i want to happen is that when the player touches the part then the text label inside of the screengui tweens on the players screen for only the player that touches the part and not for everyone in the server. So would I need to make a local script?, im not sure how to do this, can anyone help me
You should be making it a LocalScript in the first place… anyways I think your problem is you check when it’s touched, but you’re not checking if it’s touched by the LocalPlayer. Add a check to see if the person who touches this should part is the LocalPlayer
LocalPlayer won’t be in the gui, so that’s won’t work. Also the Player Instances is not a BasePart, .Touched only fires for BaseParts. What you could try doing is defining the character in a LocalScript, then checking if the Part that touched it is Part of that character
local GuiThing = PathToGui
local Player = game.Players.LocalPlayer
workspace.Part.Touched:Connect(function(hit)
local Character = Player.Character
if hit:IsDescendantOf(Character) then
--Tween
end
end)
can anyone else help me? the text label still tweens for both players even though i want it to only tween for the player that touched the part and not for every player on the server