Next time, please put your code in code block. You can do this by clicking the blue lua symbol above the text pad, then put your code inside the numeral tilde keys.
Your problem is that you're using the definition operator for a comparitive statement
= is the definition operator, it's used to define things.
==* is the comparitive operator, it's used to compare whether or not two things are identical to eachother.*
So to fix your code, on the first and third lines then just add one more equal sign(:
(NOTE: You can access the Workspace by just saying workspace. Also, assigning variables can make for much cleaner and faster code - faster meaning you don't have to retype everything)
local songa1 = workspace["EDM MIXER 1"].edmmix.MusicPlayer.PlaylistA.SongA1
if songa1.Pitch == 1 then
script.Parent.Text = "Value: Even"
elseif songa1.Pitch == 1.1 then
script.Parent.Text = "Value: +1"
end
1 comment
You can simply use "if workspace.Part.Anchored then" as the Anchored value is a boolean value so no comparison is needed.