Hi. Basically I have a part which is spawned from Lighting.
Inside the part in Lighting, it has a StringValue called Owner.
How would I make it so that when the part is touched, it changed the Owner value to a name?
This is the script inside the part:
de = false
function OnClick(hit)
if game.Players:GetPlayerFromCharacter(hit.Parent) and de == false then
de = true
local a = game.Lighting.Storage.Dew:clone()
a.Owner.Value = hit.Parent
print (hit.Parent)
end
wait(2)
de = false
end
script.Parent.ClickDetector.MouseClick:connect(OnClick)
script.Parent.Touched:connect(OnClick)
The item also has a ClickDetector. Weirdly, it detects me in the print command, but doesn't put my name in the Owner value..

2 comments
Hi. No luck sadly..
It doesnt seem to want to change the Owner string.