Trying to change BasePart.Transparency and BasePart.CanCollide in LocalScript

I’m trying to create a beep block system, à la Super Mario 3D World. I got the UI to change fine, but the properties on the parts aren’t changing.

LocalScript is contained in attached place file, in Game.StarterGui.BeepBlock
beep blocks test 12;06.rbxl (90.4 KB)

Any help is appreciated, thank you!

well changing properties on client doesn’t affect on server side. You should do it on server side instead

I don’t want it to be serversided. The sound cues get delayed if the player’s ping is too high.

then that is hard can you tell me why you want it to be transparency and stuff?

Video using the original server script here
Inspiration from Mario 3D world

I suppose you can change the collide on server while sound and transparency change on client but that will require event

Do you know how to make it unique to every player, based on when they joined?

You mean randomize or something?


when they join the game, the loop begins on their client
it will be different from someone who joined 5 seconds prior

I can see what you mean. Then i need to test it but currently im on phone so you have to wait for my respone or someone else might find a solution.

Ok so i got an idea i didn’t test this but i can only come up to this.

Everytime a player join you clone the map in the client side and set transparency cancollide sound should work in that client script since the map is on client side.

Tell me if it work

If you can make and test this go crazy bro.

Reminder that my goal is only to change transparency and collision using a localscript. Tbh you’re not being much of a help. If you have nothing to contribute, don’t reply.

Yea i will test it later i will tell you if that works

I found what you did wrong. Go to line 42 of the local script inside DeepBlock.
This will be there

local function redOff()
	for _, part in pairs(blue:GetChildren()) do
		if part:IsA("BasePart") then
			part.Transparency = 1
			part.CanCollide = false

If you look closely, you’re doing blue:GetChildren() instead of red:GetChildren()
Since this function is supposed to turn off the red, replace the “blue” with “red”
This should fix it.

1 Like

Didn’t notice that mistake. Thanks!

1 Like

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