I was messing around with a freemodel where I stumbled across this code in a LocalScript. How does this work!? it is basically a touch detecter in a LocalScript, which is weird!
function connectplrtouch(pt,func)
pt.Touched:Connect(function(t)
local c=game.Players.LocalPlayer.Character
if c and t:IsDescendantOf(c) then
func()
end
end)
end
A touch detector in a LocalScript is perfectly fine, actually! I am a bit confused on how it would work, since the event is in the function, and there isn’t any parameters to pass for “pt” and “func”…
yeah, how does it know what pt is? also, this only works for two parts lol, i made another part that was just in the WS, and nothing happened, so this is genius lol