script.Parent.Touched:connect(function(hit)
	local config = script.Parent.Configuration
	if hit.Parent and game.Players:GetPlayerFromCharacter(hit.Parent)then
		local player = game.Players:GetPlayerFromCharacter(hit.Parent)
		if player:GetRankInGroup(config.GroupId.Value) >= config.RankId.Value then
			script.Parent.CanCollide = false
			wait(1)
			script.Parent.CanCollide = true
		else
			hit.Parent.HumanoidRootPart.Position = Vector3.new(-6.2, 0.5, -5.8) + Vector3.new(0,3,0)
			hit.Parent.HumanoidRootPart.Anchored = true
			wait(5)
			hit.Parent.HumanoidRootPart.Anchored = false
		end
	end
end)

3 comments

0

I usually just disable the scripts lol....likely not the best way id think.

0

What do you mean by that?

0

they mean scripts have a disabled property set that to true