Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Vector3's not working in "PLAY" mode on roblox studio?

Hi, I'm kind of new to LUA and ROBLOX studio, and I've run into a pretty major problem

I'm trying to make a working Ouija board, where you talk to it and it will answer you.

I'm doing this using vector3's (?) to move the position of the part which points to each letter in the word. e.g. the part will move H->E->L->L->O to spell out the word "Hello".

I have not implement the chat recognition yet, so I just call the function "word1" without any kind of "trigger".

The script is located in the part which I am moving.

I have coded this for one word, and it works great when I press "run", but it doesn't work at all when I press "play". Anyone know why this is? Under here is the code:

EDIT: I just figured out you can check client/server side. I can see the part move on the SERVER side but not on the CLIENT side

start = Vector3.new(script.Parent.Position.X, script.Parent.Position.Y, script.Parent.Position.Z)

--WORDS

function word1()
	
	for i = 1, 100 do
		script.Parent.Position = script.Parent.Position + Vector3.new(0.01,0,-0.012)
		wait(0.01)
	end
	wait(0.7)
	
	
	for i = 1,100 do 
		script.Parent.Position = script.Parent.Position + Vector3.new(-0.002,0,0.010)
		wait(0.01)
	end
	wait(1)
	
	for i = 1,100 do 
		script.Parent.Position = script.Parent.Position + Vector3.new(0.004,0,0.006)
		wait(0.01)
	end
 	wait(0.7)
	
	for i = 1,100 do
		script.Parent.Position = script.Parent.Position + Vector3.new(-0.005,0,-0.015)
		wait(0.01)
	
	end
	wait(0.7)
	for i = 1, 100 do
		script.Parent.Position = script.Parent.Position + Vector3.new(0.003,0,0.023)
		wait(0.01)				
	end
	wait(0.7)
	
	for i = 1, 100 do
		script.Parent.Position = script.Parent.Position + Vector3.new(0.002,0,-0.015)
		wait(0.01)
		
	end 
	 
end

--LETTERS


function LetterK()
	for i = 1, 100 do
		script.Parent.Position = script.Parent.Position + Vector3.new(0.01,0,0.01)
		wait(0.01)
	end 

end
function LetterA()
	for i = 1, 100 do
		script.Parent.Position = script.Parent.Position + Vector3.new(0.01,0,-0.012)
		wait(0.01)
	end
end
function ReturnToStart()
	script.Parent.Position = start	
end


word1()

1 answer

Yeah so the part I was trying to move wasn't anchored lmao.

This discussion is preserved as it was. New answers, comments, and votes are closed.