I want a value to enable when the puck touches the stick heres what I have. The value is a Bool Value by the way. The script is a local
script.Parent.Touched:connect(function(Part) if Part.Name == "ball" then game.StarterPack.stick.HasPuck.Value = true end
Whenever I touch the puck with the stick it dosen't enable. Is it not possible to do this?
It is very possible to do this, and is actually quite simple.
Instead of trying to find the value from StarterPack, I put the script in the puck and set the var bool to script.Parent.HasBall(the name of the bool). I then made a Touch function and here we are.
Make Sure The Script is not local
--Setting Variables local Stick = script.Parent local bool = script.Parent.HasBall local puck = workspace.Ball --Setting the bool Value to false(I am pretty sure this is not required) bool.Value = false print("bool is false") --The function puck.Touched:Connect(function(hit) if hit == Stick or hit.Parent == Stick then bool.Value = true print("bool is true") end end)