Server Script not detecting whether or not a bool value is true or false

I’m currently making a survival game and a fishing mechanic for it!
I’m trying to check if the pointer (bait) is still in the water but it doesn’t detect if the isThrown bool is true or false!
Any help, well helps :slight_smile:

server script (inside the fishing rod tool):

RemoteTouch.OnServerEvent:Connect(function(touch)
	print("touch")
	if script.Parent.isThrown == true then
		print("thrown")
		wait(5)
	if script.Parent.isThrown == true then
		print("making sure")
		local particles = script.Parent.Pointer.particles
		particles.Enabled = true
		while true do
			wait(0.2)
			if script.Parent.isThrown == false then
				particles.Enabled = false
				end
			end
		end
	end
end)

local script (also in the fishing rod tool)

script.Parent.Pointer.Touched:Connect(function(t)
	if isEquipped and not hasDied and t.Name == "lake" then
		print("sending")
		RemoteTouch:FireServer()
		print("sent")
	end
end)

I’m not 100% sure, but I think you also need to put .Value?

if script.Parent.IsThrown.Value then
1 Like

I’ve tried this and bool values do not need .Values you can just go = true or = false

1 Like

Hmmm. Try printing what the value of the bool is? Is it true of false, or something else?

If the value is false , then the entire program won’t run

1 Like

You still need to. An Instance is always true. However if you want it to actually modify with the value you need to do .Value

3 Likes