The script inside the part:

local model = script.Parent.Parent
local platform = model.platform
local start = model.pointA
local finish = model.pointB
local bodyPos = platform.BodyPosition
local time = 2 --Time between motion

while true do
	bodyPos.position = start.Position
	wait(time)
	bodyPos.position = finish.Position
	wait(time)
end

The script in the ServerScriptService:

local platform = p
		local start = p.Position
		local finish = p.End.Value
		local bodyPos = Instance.new("BodyPosition", platform)
		local bodyGyr = Instance.new("BodyGyro", platform)

		while true do
			bodyPos.position = start
			wait(5)
			bodyPos.position = finish
			wait(5)
		end

As you can see the scripts have identical functions, except the script in the ServerScriptService doesn't stick to the player, but the script parented to the part sticks, got any answers?????!?!?!!?!?!??!?!?!?!??!?!?!?

1 comment

0

Why is the second script's indenting wrong? Also, i don't see any part of the script referring to a player. Additionally, you define platform as "p". Did you mean p = platform? Also, you don't define platform in the second script at all! Did you mean to put the first chunk of script in the second one as well? Where did you even get these scripts?