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

How to make a cancollide = false object that turns cancollide = true for only that player?

Asked by 5 years ago

I'm new to game making, so I was wondering how to make a cancollide = false part that turns cancollide = true when a player touches it, but it only goes cancollide = true for that player.

0
Use a local script for the only that player part NickIsANuke 217 — 5y

3 answers

Log in to vote
0
Answered by 5 years ago
Edited 5 years ago

Using a localscript, set the cancollide property to true. Localscripts do everything only for that specific player. A good place to put this localscript would be in startergui.

local part=--your part
part.CanCollide=true
Ad
Log in to vote
0
Answered by 5 years ago
Edited 5 years ago

In a local script, set the part's can collide property to true.

Log in to vote
0
Answered by 5 years ago
Edited 5 years ago

heres my script for when a player touchs the part its can collide = true

local part = script.Parent
part.Touched:connect(function(hit)
    wait(0.5) -- so the player has time to walk past it
    part.CanCollide = true
end)

-- scripted by 14zanderbilt

you can edit it. this script makes it so that whenever you touch the part its cancollide is true

Answer this question