Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to fix cancollide change locally affecting globally?

Asked by 2 years ago

I'm using this code to change the cancollide property on a part locally (only to the person who triggered it) but it keeps happening globally.

local part = workspace.Dogsmain

local function appear(otherPart) local partParent = otherPart.Parent local humanoid = partParent:FindFirstChild("Humanoid") if humanoid then game.Workspace.S1.CanCollide = true game.Workspace.S2.CanCollide = true game.Workspace.s3.CanCollide = true game.Workspace.s4.CanCollide = true game.Workspace.s5.CanCollide = true game.Workspace.s6.CanCollide = true game.Workspace.s7.CanCollide = true game.Workspace.s8.CanCollide = true game.Workspace.s9.CanCollide = true game.Workspace.s10.CanCollide = true end end

part.Touched:Connect(appear)

Does anyone know how to make this work locally?

0
Is it in a local script? dethshoot3987 15 — 2y
0
Yes nardawg101 0 — 2y

Answer this question