TFlanigan
(teef)
February 10, 2021, 3:20pm
#1
i wrote a placement script, but the rotation for some reason is not working properly and i cannot rotate upside down. heres the script. I would upload a gif, but for some reason i cant, even tho its like 3 seconds long
elseif input.KeyCode == Enum.KeyCode.R then
game.ReplicatedStorage.Remotes.RotatePart:FireServer(plot.Middle,Vector3.new(90,0,0))
elseif input.KeyCode == Enum.KeyCode.T then
game.ReplicatedStorage.Remotes.RotatePart:FireServer(plot.Middle,Vector3.new(0,90,0))
elseif input.KeyCode == Enum.KeyCode.Y then
game.ReplicatedStorage.Remotes.RotatePart:FireServer(plot.Middle,Vector3.new(0,0,90))
can show the server script? bcz this code cant saw some bug
1 Like
TFlanigan
(teef)
February 10, 2021, 3:35pm
#3
sure, sorry for the late answer, i was afk. here it is
local remote = game.ReplicatedStorage.Remotes.RotatePart
remote.OnServerEvent:Connect(function(plr,part,vector3)
part.Orientation += vector3
end)
Could you print out what the part & vector3 variables are? It might also be that you just need to remove the +
operator
TFlanigan
(teef)
February 10, 2021, 3:44pm
#5
part is the middle of the base, thats where placement script takes the rotation from to the item and vector3 is in the first script
TFlanigan:
elseif input.KeyCode == Enum.KeyCode.R then
game.ReplicatedStorage.Remotes.RotatePart:FireServer(plot.Middle,Vector3.new(90,0,0))
elseif input.KeyCode == Enum.KeyCode.T then
game.ReplicatedStorage.Remotes.RotatePart:FireServer(plot.Middle,Vector3.new(0,90,0))
elseif input.KeyCode == Enum.KeyCode.Y then
game.ReplicatedStorage.Remotes.RotatePart:FireServer(plot.Middle,Vector3.new(0,0,90))
Is that the entirety of the LocalScript? Also is plot.Middle
a Part or a Model?
TFlanigan
(teef)
February 10, 2021, 4:18pm
#7
it is a local script and middle is a part
Couldn’t you just change the Orientation to 180 instead? I tried it and it looks fine
TFlanigan
(teef)
February 10, 2021, 4:21pm
#9
yeah but then i wont be able to do 90 degree turns
Now I’m confused, do you want something like this???
https://gyazo.com/ead4113ef31b9b7071533a46494f54be
TFlanigan
(teef)
February 10, 2021, 4:32pm
#11
yeah, thats what i want to achieve
I literally just copied & pasted the code onto a empty place and that’s what I got, after hitting the R/T/Y keys a couple times
TFlanigan
(teef)
February 10, 2021, 4:35pm
#13
strange
[placeholder since the minimum amount of characters in a reply is 30]
Do you want the place file to compare the two?
TFlanigan
(teef)
February 10, 2021, 4:39pm
#15
i dont need it, i mean if you copied the script then i guess ima just try different methodds until i fix it