Unable to change part properties in Module Script

So, I’ve been working on a module script and I need to change the properties of a part which I take from a dictionary. The problem is, when I take this part from the dictionary the property doesn’t change, whereas if I just take it from the workspace the property does change…

local Cutscene = {	
	["FourWords"] = {
		["Root"] = game.ReplicatedStorage.Cloning.Cutscenes.FourWords,		
		["NumberOfTweens"] = 4,
		["Wait1"] = 2,
		["Wait2"] = 2.5,
		["Wait3"] = 2.15,
		["Wait4"] = 4.3,
		["WorkspaceText1"] = "injustfourwords",
		["WorkspaceText2"] = "youonlygetfourwords", 
		["WorkspaceText3"] = "yougottousefourwords", 
		["WorkspaceText4"] = "thenyoumightmovefourwords",
	}
}

function Cutscene.PlayCutscene(name)
	local CutsceneCloned = game.ReplicatedStorage.Cloning.Cutscenes[name]:Clone()
	CutsceneCloned.Parent = workspace.Cutscenes
	
	wait(1)
	
	local concatonatedpart = "Pos".. tostring(counter)
	local concatonatedtext = "WorkspaceText".. tostring(counter)
	local moved = Cutscene[name][concatonatedtext]
	local movedtext = game.ReplicatedStorage.Cloning.Cutscenes[name].text[moved].four
	local part = game.ReplicatedStorage.Cloning.Cutscenes[name].points[concatonatedpart]
	
	movedtext.Transparency = 1 -- the property of the part in the workspace remains as 0
	print(tostring(movedtext.Transparency)) -- this prints 1 somehow
	workspace.Cutscenes.FourWords.text.injustfourwords.four.Position = part.Position -- this works
end

The movedtext.Transparency = 1 doesnt change the transparency of the part in the workspace.
The print(tostring(movedtext.Transparency)) prints 1 despite this.
The workspace.Cutscenes.FourWords.text.injustfourwords.four.Position = part.Position works as normal.

I cannot figure out for the life of me why the movedtext.Transparency = 1 won’t work so any help would be appreciated heavily!

Is this intended that you are setting the transparency for the part in ReplicatedStorage? If not then it’s painfully obvious that it doesn’t get changed in workspace.

2 Likes

Man, I can’t believe it was that simple. I just spent the past hour and a half changing completely different things and the solution was just changing one line. Thank you so much for this, I can’t believe I didn’t notice this earlier lol. You’re a goat.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.