Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Problem with a part not turning off cancollide with a localscript?

So i have this script but its server side, the script makes it so when you touch the part with the script in it the other part named wall getts its cancollide turned off. But i need it to work client side. So I put it in a local script but it does not work. Can someone help me?

Heres the script:

local part = script.Parent
local wall = script.Parent.Parent:WaitForChild("Wall")

local function Disappear()
	wall.CanCollide = false
	wait(3)
	wall.CanCollide = true
end

part.Touched:Connect(Disappear)

I need it so the wall has its can collide turned off for just the client. not the server.

1 answer

✓ Accepted answer

Use a remote event that fires to the client you want cancollide turned off for. In a local script, set it where when the remote event is fired, it does whatever you want. (In this case setting the cancollide of a part to true or false.)

3 comments

0

thank you!!

0

no problem :)

0

no problem :)

This discussion is preserved as it was. New answers, comments, and votes are closed.