Hello! I'm making a Musical Statues game, and my LocalScript will not work, which is very much required for the game. I've had a go at it myself using all the knowledge I know so far..

local message = game.Players.LocalPlayer["PlayerGui"].Message.TextLabel local floor = game.Workspace.Area["Floor"]

while true do if message.Text == "FREEZE! (0)" then floor.Transparency = 0.1 floor.CanCollide = false end if message.Text == "DANCE!" then floor.Transparency = 0 floor.CanCollide = true end

if message.Text == "Congratulations! You won!" then
	floor.Touched:connect(function(hit)
		if hit.Parent:FindFirstChild('Humanoid') then
			hit.Parent.Torso.CFrame = CFrame.new(213, 30.5, -23)
			wait()
			script.Parent["Win Script(W/ Sound)"].Disabled = false
			wait(3)
			script.Parent["Win Script(W/ Sound)"].Disabled = true
		end
	end)
end

end

but when the TextLabel.Text = FREEZE! (0) the floor won't go Transparent and the CanCollide won't turn off, same with the DANCE! except the floor just stays the same (Because the above didn't work) and the CanCollide is on.

The script location is: game.StarterPlayer.StarterPlayerScripts.GameScript(local script)

5 comments

0

my biggest enemy, a lack of code blocks!

0

I don't know why it turned out like that..? On other questions it doesn't do that

0

Format your code correctly

0

How do you do that? Sorry, new to this... I just copied the script from my studio and thought it would work.

0

My brain hurts when I try to read code without code blocks XD