Dumb question about anchoring and scripts

I have a really dumb question but i couldnt find anything on the devforum about it so I wanted to ask if maybe it is normal:

In one of my scripts after you equip a tool, 8 parts are supposed to un-anchor. And it seems as though only after i touch that part it becomes un-anchored. Is this normal?

1 Like

Hmmmm, Can you send the script?

function abc()
	bbl.Anchored = false
	bbr.Anchored = false
	btl.Anchored = false
	btr.Anchored = false
	fbl.Anchored = false
	fbr.Anchored = false
	ftl.Anchored = false
	ftr.Anchored = false
end

tool.Equipped:Connect(function()
	frame.Visible = true
	text.Visible = true
	wait(5)
	frame.Visible = false
	abc()
	text.Text = "Time has slowed down!, Jump on the cube to quickly make it fall apart!"
end)

Maybe do like this:

tool.Equipped:Connect(function()
	frame.Visible = true
	text.Visible = true
	wait(5)
	frame.Visible = false
	bbl.Anchored = false
	bbr.Anchored = false
	btl.Anchored = false
	btr.Anchored = false
	fbl.Anchored = false
	fbr.Anchored = false
	ftl.Anchored = false
	ftr.Anchored = false
	text.Text = "Time has slowed down!, Jump on the cube to quickly make it fall apart!"
end)

I think it should work!

Ok thanks i will try it out.

(Extra characters because post needs more words)

Weird. That also didnt work. Could it be because tools dont work well with anchoring parts?

It may be.

(Extra characters because post needs more words)

is that all inside local script?

Yeah I am new to coding and I thought if i only want the one player who equips the tool to see the parts get un-anchored, it had to run on the client/on a local script. So to answer your question in one word, yes it is.

Do you get any errors in the output?

Not a single error in the output.

this could be becuase of network owner of those parts if you know how to use remote events make sure to unachor them from the server

is that local script?
(char limit)

You do not change properties of anything in the workspace in the client side. Do it in the server side, with the use of remote events.

Yes it is, he/she already said it.

ok thank you I will look into remote events and like V_ladzec said check network owners.

1 Like

if you want only one player to see them get unachored then those parts should be created/cloned inside local script

tool.Equipped:Connect(function()
	frame.Visible = true
	text.Visible = true
	wait(5)
	for _, v in pairs(tool:GetChildren()) do
     if v:IsA("BasePart") then
          v.Anchored = false
     end
   end
	text.Text = "Time has slowed down!, Jump on the cube to quickly make it fall apart!"
end)
1 Like