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

I try to get a value to change when a brick is touched. But how do i fix it?

Asked by
Webm07 43
6 years ago

I'm making a script where if a player, or object touches it, it will set the "G" value to true. When I touch it in play mode, and I try it with the print command, it comes out as false. I want to be true, but it doesn't work!

Code:

local SP = script.Parent

function Check()
SP.G.Value = true
end

function UnCheck()
SP.G.Value = false
end

SP.Touched:connect(Check)
SP.TouchEnded:connect(UnCheck)

Answer this question