So I am working on a City Roleplaying game. Mainly to practice my scripting abilities. But I have run into a little problem. I can not figure out how to save the name of a Player who touched a brick. So I have a door and you walk into it to become the owner, how do I save the name of whoever touched the door so I can make them become the owner? So in short all I need is to find out how to tell who touched the door and is it local script or server script? So far this is all I have, I need this save thing before I can continue.
local Door = script.Parent
local Name = script.Parent.House.SurfaceGui.TextLabel.Text
function whotouched(hit)
end

1 comment
Place this script as a child of the part that should be touched. Insert a StringValue called "Owner" as a child of this script.