This is a Server Script
local part = script.Parent --player-- local Player = game:GetService("Players").LocalPlayer local PlayerName = Player.Name part.Touched:Connect(function(touch) if touch.Parent:FindFirstChild("Humanoid") then print(PlayerName) end end)
local part = script.Parent
--player--
local gui = part.SurfaceGui.nameGui local data = script.Parent.Parent.Parent:WaitForChild("Data") local owner = data.Owner local claimed = data.Claimed
part.Touched:Connect(function(touch)
if touch.Parent:FindFirstChild("Humanoid") then local playerName = Player:GetPlayerFromCharacter(touch.Parent) --Gets Players Name print(playerName) end
end)