Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Function pseudo-sets value for some reason?

Asked by 1 year ago
Edited 1 year ago
game.ServerStorage.toolactive.Event:Connect(function(player, mousetarget)
    if rock.Transparency ~= 1 then


        if mousetarget == rock then
            rock.Transparency = 1
            Owner.Value = player.Name   




            end
        end
    end)

This code sets the Owner value to the player name, and upon printing Owner.Value in the function it says it is the player name, BUT, upon printing outside the function the value has not changed.

The transparency change works which makes me even more confused.

I have no idea what causes this, any contributions are appreciated.

0
Make sure Owner is defined CaptainGreenSeals 23 — 1y
0
Everything in this is defined, the script is pretty long so I only included the part that was causing issues. Stiles8353 35 — 1y

1 answer

Log in to vote
1
Answered by 1 year ago

I figured out how to get the player a different way with some tomfoolery on the server side.

Ad

Answer this question