I have a boolean, it isn't changing from a localscript, please help..?

localscript:

workspace.Crusher.Action.Value = true

Working in studio and not in game D:

There is also a larger script to it:

local debounce = true
script.Parent.MouseButton1Click:Connect(function()
	workspace.Base.CanCollide = true
	if debounce == true then
		debounce = false
	local bruh = script.Parent.Parent.Parent.Parent.Game_Frame
	repeat wait(.1) bruh.BackgroundTransparency = bruh.BackgroundTransparency - 0.05 until bruh.BackgroundTransparency <= 0
	wait(3)
	script.Parent.Parent.Parent.Parent.Parent.Game.Game.UI_OnDeath.Visible = false
	workspace.Scripts.Values.Speed.Value = 0
	game.Players.LocalPlayer.leaderstats.Speed.Value = 0
	local char = game.Workspace:FindFirstChild(game.Players.LocalPlayer.Name)
	local t = char.HumanoidRootPart
	if t then
	t.CFrame = CFrame.new(Vector3.new(23382.555, 145145.609, -1040.554))
	print(t.Position)
	script.Parent.Parent.Parent.Parent.Game["Duplicated Layer"].Position = UDim2.new(1,0,1,0)
	script.Parent.Parent.Parent.Parent.Game.Layer:TweenPosition(UDim2.new(0,0,1,0))
	script.Parent.Parent.Parent.Parent.Game["Duplicated Layer"].Main_Menu:TweenPosition(UDim2.new(-0.2,0,0.08,0))
	script.Parent.Parent.Visible = false
	workspace.Scripts.Values.Humanoid.Value = true
	script.Parent.Parent.Parent.Parent.Score.Visible = true
	repeat wait(.1) 
		bruh.BackgroundTransparency = bruh.BackgroundTransparency + 0.05 
	until bruh.BackgroundTransparency >= 1
	script.Parent.Parent.Parent.Parent.Score.Ticks.Value = 4
	script.Parent.Parent.Parent.Parent.Score.Ticker.Value = true;
	repeat wait() until script.Parent.Parent.Parent.Parent.Score.Ticks.Value < 1
	workspace.Scripts.Values.Speed.Value = game.Players.LocalPlayer.leaderstats.Speed.Value
	if game.Players.LocalPlayer.leaderstats.Speed.Value == 0 then
		game.Players.LocalPlayer.leaderstats.Speed.Value = 16
		workspace.Scripts.Values.Speed.Value = 16
	end
	end
	workspace.Scripts.Values.Current_Score.Value = 0
	workspace.Crusher.Action.Value = true
	wait(1)
	else
	wait(5)
	debounce = true
	end
end)

4 comments

0

Is your game in FE?

0

Nope

0

Line 12 will cause line 13 to error if a player named Part joined the game LOL

0

did u perhaps see "MouseButton1Click" at the top?