Hello, Fellow Devs! My Discord is on lock rn so I can’t really ask any discord servers until further notice from discord. Anyways, I was working on a system to check The terrain on which the player chose for the landing system of my game. Here’s the “Martian Map”.
As you can see the map has some black/brownish spots (Mountainous), The one without (Plains), And lastly the Artic.
I want to check which did the player select. And I had an idea of using Mouse.Target
To return the name and the Selection of the player. I had a hitbox already (those whitish outlines of the map) to check what terrain did the player choose. Ik this might be inefficient but I decided it would be a test. So I smacked the code and so far the only problems I encounter are the following.
The frame doesn’t follow the mouse smoothly
The same error on this Tween code.
local TweenMouse = TweenServ:Create(Frame,TweenInfo.new(.01,Enum.EasingStyle.Sine, Enum.EasingDirection.InOut), {Position = UDim2.new(0, Mouse.X, 0, Mouse.Y)})
Error:
Attempt to call a TweenInfo Value
Code to check the terrain, error had the problem with .Name
if Mouse.Target.Name == "Plains" or "Mountains" or "Artic" then
11:12:44.309 - Players.cool900s.PlayerGui.LocalScript:19: attempt to index nil with 'Name'
And yes I’ve tried asking the RoDevs Discord (Before) and searching up here on the DevForums, I haven’t really looked this problem when I encountered it because I had Online Classes.
Take note I don’t want to be spoonfed that much. Im a moderate Scripter where I know some complicated stuff like RayCast, CFrame, and etc. The Problem is I haven’t played around it so I would have no idea what to do if I encounter a problem. Please take it light on me , Ive been modelling for the past few weeks and just got back to scripting. Thanks in Advance!