Hello my fellows, devs,
I am trying to make a door that are using ClickDetector. I try putting my custom cursor, but it didn’t show up when I hover my mouse to the door. Why?
I hope you guys can help >
Cheers,
The_UncleDev
Hello my fellows, devs,
I am trying to make a door that are using ClickDetector. I try putting my custom cursor, but it didn’t show up when I hover my mouse to the door. Why?
I hope you guys can help >
Cheers,
The_UncleDev
Hey there!
Can we see some more details? Can you screenshot the properties of the door? Is the image valid? Is there anything covering the door?
And this probably belongs in #help-and-feedback:scripting-support
Thanks!
Nvm, I founded a way to make it work.
This is how I made it for people who don’t know:
Door(ServerScript)
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Events = ReplicatedStorage:WaitForChild("Events")
local door = script.Parent
local doorFrame = door.DoorFrame
local hinge = door.Hinge
local function hoverAction(action, player)
Events:WaitForChild("hoverActionTrigger"):FireClient(player, action, "Door")
end
doorFrame.ClickDetector.MouseHoverEnter:Connect(function(player)
if player then
hoverAction("Enter", player)
end
end)
doorFrame.ClickDetector.MouseHoverLeave:Connect(function(player)
if player then
hoverAction("Leave", player)
end
end)
CursorClient(LocalScript)
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Events = ReplicatedStorage:WaitForChild("Events")
local player = game.Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local mouse = player:GetMouse()
mouse.Icon = "rbxassetid://" .. script.OriginId.Value
Events:WaitForChild("hoverActionTrigger").OnClientEvent:Connect(function(action, triggerLocation)
if action == "Enter" then
if triggerLocation == "Door" then
mouse.Icon = "rbxassetid://" .. script.DoorId.Value
else
mouse.Icon = "rbxassetid://" .. script.PickupId.Value
end
else
mouse.Icon = "rbxassetid://" .. script.OriginId.Value
end
end)
ty for helping :>