on the very right is the sled and the ramp to slide all the way down till it hits the wall the second picture is the sled itself with a "hitbox" around it its supposed to hit the wall on the very right and supposed to spawn cframe of another part i added in the area just before the slope but its not even teleporting which is weird. im new and trying new things so it might be an easy fix for anyone this is the code i have
#Part touches part (basic scripting error)
1 messages · Page 1 of 1 (latest)
local sled = game.Workspace.Cart
local spawn = game.Workspace.Spawn
if sled.HitBox.Touched == workspace.Wall then
sled.PrimaryPart.CFrame = spawn.CFrame
end
seems like a simple syntax issue, try this and if it doesnt work then uncomment the part i put there.
sled.HitBox.Touched:Connect(function(part)
--print(part)
if part == workspace.Wall then
sled.PrimaryPart.CFrame = spawn.CFrame;
end
end)```
@maiden monolith it works but for some reason only 2 times any more and it wont teleport. know why?