Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Unable to cast value to Object. Need help? Bus Interior Screen (Solved)

Asked by 4 years ago
Edited 4 years ago

This question has been solved by the original poster.

[FIXED] I am making a bus game so I made some interior screens for my bus. When touching a brick nothing happened.

Solution: Put a Script into the Model of the Screen. That brick where it should change the inside screen should be mentioned in the script. For example this is mine: ~~~~~~~~~~~~~~~~~

local Dest = script.Parent.Parent.DESTS

function DestChange() script.Parent.DynamischesFahrgastinformationsSystem.SurfaceGui.MainScreen.Visible = false wait() script.Parent.DynamischesFahrgastinformationsSystem.BrickColor = BrickColor.new(163, 162, 165) wait() end

function DestChange2() script.Parent.DynamischesFahrgastinformationsSystem.SurfaceGui.MainScreen.Visible = true wait() script.Parent.DynamischesFahrgastinformationsSystem.BrickColor = BrickColor.new(13, 105, 172) wait() end

game.Workspace.DestChanger.Touched:Connect(DestChange) game.Workspace.DestChangerEinrueck.Touched:Connect(DestChange2) ~~~~~~~~~~~~~~~~~

DO NOT USE A LOCALSCRIPT UNLESS YOU ARE SURE HOW TO DEBUG THE PROBLEM

0
Are you trying to find a spesific value? TheEmeraIdDev 22 — 4y
0
BrickColor.new(Color3.new(1,1,1)), since 255 in fromRGB is equivalent to 1 in the standard constructor. Or you can stick with Color3.fromRGB(255,255,255) in the BrickColor constructor. DeceptiveCaster 3761 — 4y
0
No. I am trying to change the interior screen. Seems as I fixed it myself. But thx for the reply xxMVG_Fan8xxALT 1 — 4y
0
Why did you delete the original post from your question? This makes it hard for future readers with the same issue to find a solution programmerHere 371 — 4y
0
edited :) xxMVG_Fan8xxALT 1 — 4y

Answer this question